diff options
author | Jim Meyering <meyering@redhat.com> | 2008-02-07 23:30:07 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-02-07 23:31:17 +0100 |
commit | 16c005fe6ad5e41b58911c2aef0831a60f197c06 (patch) | |
tree | 1c7255871cb28d2fe64b5181938440e657afa618 /GNUmakefile | |
parent | 5ae0543737b6a4c7dd84c01dddaa9b244fe62107 (diff) | |
download | coreutils-16c005fe6ad5e41b58911c2aef0831a60f197c06.tar.xz |
We *do* need two different version files.
One for tarball-only, the other to be updated any time we
get a new value of $(VERSION).
* Makefile.am (dist-hook): Create .tarball-version in dist tarball.
* GNUmakefile (_curr-ver): Make git-version-gen use it.
* .gitignore: Ignore it.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index af73b7ee3..5f17049ae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -40,21 +40,26 @@ export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner include Makefile +_curr-ver := $(VERSION) + # Ensure that $(VERSION) is up to date for dist-related targets, but not # for others: running autoreconf and recompiling everything isn't cheap. ifeq (0,$(MAKELEVEL)) _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS)) ifneq (,$(_is-dist-target)) - _curr-ver := $(shell build-aux/git-version-gen .version) + _curr-ver := $(shell build-aux/git-version-gen .tarball-version) ifneq ($(_curr-ver),$(VERSION)) $(info INFO: running autoreconf for new version string: $(_curr-ver)) dummy := $(shell rm -rf autom4te.cache; autoreconf) - dummy := $(shell echo $(_curr-ver) > .version) _created_version_file = 1 endif endif endif +ifneq ($(_curr-ver),$(VERSION)) + dummy := $(shell echo $(_curr-ver) > .version) +endif + ifneq ($(_created_version_file),1) dummy := $(shell test -f .version || echo $(VERSION) > .version) endif |