From e786c70de9a65c44f575ab8c61ff00fbbd2df585 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 19 Feb 2011 19:01:07 +0200 Subject: build: change version number generation Force Makefile to always run version.sh to potentially regenerate version.h. Drop compiler version and 'git-' prefix from version number. Match only git tags starting 'v'+number when generating version number; leave the 'v' out from the result. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 84914abb2c..67d1bbb06c 100644 --- a/Makefile +++ b/Makefile @@ -632,8 +632,11 @@ config.mak: configure @echo "####### Please run ./configure again - it's changed! #######" @echo "############################################################" -version.h: version.sh - ./$< `$(CC) -dumpversion` +version.h .version: version.sh + ./$< + +# Force version.sh to run to potentially regenerate version.h +-include .version %$(EXESUF): %.c $(CC) $(CFLAGS) -o $@ $^ @@ -855,7 +858,7 @@ driversclean: -include $(DEP_FILES) .PHONY: all doxygen locales *install* *tools drivers -.PHONY: checkheaders *clean tests +.PHONY: checkheaders *clean tests .version # Disable suffix rules. Most of the builtin rules are suffix rules, # so this saves some time on slow systems. -- cgit v1.2.3