]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Generated Makefile.rules contain OMK version number
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 17 Feb 2009 14:00:22 +0000 (15:00 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 17 Feb 2009 14:00:22 +0000 (15:00 +0100)
snippets/Makefile [moved from snippets/Makefile.omk with 69% similarity]
snippets/base.omk

similarity index 69%
rename from snippets/Makefile.omk
rename to snippets/Makefile
index dbd9b51f0d6b119e3bf2d35c5a74c5200b16b1b1..b4ed27939d52635debc33ac60f825f51eea0d037 100644 (file)
@@ -2,8 +2,12 @@ all: buildrules
 
 .PHONY: FORCE
 
+version := $(patsubst v%,%,$(shell git describe))
+
 ../rules/%/Makefile.rules: Makefile.rules.% FORCE
-       python ../omkbuild.py -o $@ $<
+       python ../omkbuild.py -o $@.tmp $<
+       sed -i -e "s/@git-describe@/$(version)/g" $@.tmp
+       mv $@.tmp $@
 
 TOP_LEVEL_SNIPPETS = $(filter-out %~,$(wildcard Makefile.rules.*))
 RULE_TYPES = $(TOP_LEVEL_SNIPPETS:Makefile.rules.%=%)
index 2c0846a60ffe1962a87f8fa3e94b8a3342f1bd85..da68ea537b393b743ea8cd1716768a9128f6b6b9 100644 (file)
@@ -4,6 +4,7 @@
 #  (C) Copyright 2006 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
+#  Version:  @git-describe@
 #
 # The OMK build system is distributed under the GNU General Public
 # License.  See file COPYING for details.