From 1618b906f5eacf544bc01e7a79655cebda862561 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 17 Feb 2009 15:00:22 +0100 Subject: [PATCH] Generated Makefile.rules contain OMK version number --- snippets/{Makefile.omk => Makefile} | 6 +++++- snippets/base.omk | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) rename snippets/{Makefile.omk => Makefile} (69%) 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. -- 2.39.2