Changeset c20d743


Ignore:
Timestamp:
Dec 2, 2013, 3:59:18 AM (8 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Children:
7d6039d
Parents:
a3bc1f8
git-author:
Anders Kaseorg <andersk@mit.edu> (08/11/13 16:02:42)
git-committer:
Anders Kaseorg <andersk@mit.edu> (12/02/13 03:59:18)
Message:
Support baking a version into the tarball with ‘make dist VERSION=…’

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    ra3bc1f8 rc20d743  
    22
    33GIT_DESCRIPTION := $(if $(wildcard $(srcdir)/.git),$(shell cd $(srcdir) && git describe --match='barnowl-*' HEAD 2>/dev/null))
    4 VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),@VERSION@)
    5 -include BUILD_VERSION.mk
     4VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),$(DIST_VERSION))
     5DIST_VERSION = @VERSION@
     6-include $(srcdir)/DIST_VERSION.mk BUILD_VERSION.mk
    67
    78FORCE:
    89BUILD_VERSION.mk: $(if $(filter-out $(BUILD_VERSION),$(VERSION)),FORCE)
    910        echo 'BUILD_VERSION = $(VERSION)' > $@
     11dist-hook:: $(if $(filter-out @VERSION@,$(VERSION)),dist-hook-version)
     12dist-hook-version:
     13        echo 'DIST_VERSION = $(VERSION)' > $(distdir)/DIST_VERSION.mk
    1014
    1115bin_PROGRAMS = bin/barnowl
     
    105109
    106110CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) BUILD_VERSION.mk
     111MAINTAINERCLEANFILES = DIST_VERSION.mk
    107112EXTRA_DIST = \
    108113    autogen.sh \
Note: See TracChangeset for help on using the changeset viewer.