From: Michal Sojka Date: Tue, 17 Feb 2009 14:00:22 +0000 (+0100) Subject: Generated Makefile.rules contain OMK version number X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/1618b906f5eacf544bc01e7a79655cebda862561 Generated Makefile.rules contain OMK version number --- diff --git a/snippets/Makefile.omk b/snippets/Makefile similarity index 69% rename from snippets/Makefile.omk rename to snippets/Makefile index dbd9b51..b4ed279 100644 --- a/snippets/Makefile.omk +++ b/snippets/Makefile @@ -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.%=%) diff --git a/snippets/base.omk b/snippets/base.omk index 2c0846a..da68ea5 100644 --- a/snippets/base.omk +++ b/snippets/base.omk @@ -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.