summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-19 19:01:07 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-19 19:07:12 +0200
commite786c70de9a65c44f575ab8c61ff00fbbd2df585 (patch)
tree271263506248179c72496c5d2aa7f9c729a62335 /Makefile
parentd9c79b7dc6748a534ff370ecf52fc747084b9625 (diff)
downloadmpv-e786c70de9a65c44f575ab8c61ff00fbbd2df585.tar.bz2
mpv-e786c70de9a65c44f575ab8c61ff00fbbd2df585.tar.xz
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
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.