[self-follow-up]

I left out a step from my explanation.

At 2026-07-21T00:35:40-0500, G. Branden Robinson wrote:
> If you're doing an out-of-tree build, then the presence of ".version"
> in your Git working copy can confuse a human because its contents can
> get very stale, but it doesn't confuse the build system--I'll explain
> below.  You can delete it and start an out-of-tree build anew.
> 
> The rules for generating these files are as follows.
> 
> $ nl -ba Makefile.am | sed -n 872,877p
>    872  # Version files - see script "build-aux/git-version-gen".
>    873  .version:
>    874          $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
>    875  dist-hook:
>    876          $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
>    877

Where does the make(1) macro `VERSION` get its definition?

Earlier in the file.

$ nl -ba Makefile.am | sed -n 509,530p
   509  # 'VERSION' is generated by gnulib script git-version-gen, using the
   510  # command 'git describe':
   511  #
   512  # - From a git repository: if the current commit corresponds to a
   513  #   tag, then 'VERSION' is simply the tag (e.g. 1.22.3).  Otherwise
   514  #   'VERSION' has the following format:
   515  #     <tag>-<nb_commits>-<commit>
   516  #
   517  #   With:
   518  #     . tag: the most recent tag reachable from the current commit
   519  #     . nb_commits: number of commits between the most recent tag and
   520  #       the current commit.
   521  #     . current commit, abbreviated.
   522  #   For example: 1.22.3.real.434-5aafd
   523  #   The version is stored in .version.
   524  #
   525  # - From a tarball, the version is taken from .tarball-version
   526  #
   527  # REVISION is the full revision given by git-version-gen, which can
   528  # have non-alphanumeric symbols.
   529  #
   530  # Also see configure.ac for the related SHORT_VERSION macro.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

  • ... G. Branden Robinson
    • ... Alexis (surryhill)
      • ... G. Branden Robinson
        • ... Alexis (surryhill)
        • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
          • ... G. Branden Robinson
            • ... G. Branden Robinson
            • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
              • ... G. Branden Robinson
                • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
                • ... G. Branden Robinson
                • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
                • ... G. Branden Robinson
                • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
                • ... Alexis (surryhill)
                • ... Collin Funk
                • ... Alexis (surryhill)

Reply via email to