From: Punit Agrawal Date: Sun, 3 Mar 2019 09:16:24 +0900 Subject: Makefile: Fix version discovery Upstream uses git based discovery to generate versioning information for release tar balls. The invocation of the version generation script (localversion) doesn't work with packaging that lives in git repositories. Fix this by moving the relevant bits of versioning to the Makefile. --- Makefile.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 65ae5a4..4c12a56 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,6 +27,8 @@ SOURCE = $(shell find . -maxdepth 1 ! -name version.h -a -name '*.[h]') SOURCE += *.c *.lds Makefile NODEPTARGETS= +REL_VERSION=2.23 + INSTALL = install LDFLAGS += -ldl @@ -287,11 +289,11 @@ $(OBJDIRS): %: @mkdir -p $@ # -$(VERSION): always +$(VERSION): FORCE @$(VECHO) VERSION - ./localversion version $(SOURCE) -always: -# + printf "// %s\n" "${REL_VERSION}" > $@ + printf "#define VERSION \"%s\"\n" "${REL_VERSION}" >> $@ +FORCE: snapshot: $(VERSION)