distroname and distrorelease exported in all specfiles, as was pldistro
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 23 Nov 2007 08:55:44 +0000 (08:55 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 23 Nov 2007 08:55:44 +0000 (08:55 +0000)
Makefile
planetlab.mk

index 8f7e977..280d2d3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -245,8 +245,12 @@ $(foreach package, $(ALL), $(eval $(call package_hasdate,$(package))))
 define target_spec
 $($(1)_specpath):
        mkdir -p SPECS
-       echo "%define pldistro $(PLDISTRO)" > $($(1)_specpath)
+       (echo -n "# Generated by planetlab build from $($(1)-SPEC) on " ; date) > $($(1)_specpath)
+       echo "%define distroname $(DISTRO)" >> $($(1)_specpath)
+       echo "%define distrorelease $(RELEASE)" >> $($(1)_specpath)
+       echo "%define pldistro $(PLDISTRO)" >> $($(1)_specpath)
        $(if $($(1)_hasdate),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1)_specpath),)
+       echo "# included from codebase specfile" >> $($(1)_specpath)
        $(if $($(1)-SPECVARS), \
          $(foreach line,$($(1)-SPECVARS), \
            echo "%define" $(word 1,$(subst =, ,$(line))) "$(word 2,$(subst =, ,$(line)))" >> $($(1)_specpath) ;))
index b480d86..a100aa0 100644 (file)
@@ -115,7 +115,6 @@ ALL += ulogd
 #
 netflow-MODULES := PlanetFlow
 netflow-SPEC := netflow.spec
-netflow-SPECVARS := distroname=$(DISTRO) distrorelease=$(RELEASE)
 ALL += netflow
 
 #
@@ -265,5 +264,4 @@ myplc-devel-RPMBUILD := sudo bash ./rpmbuild.sh
 #
 myplc-devel-native-MODULES := MyPLC
 myplc-devel-native-SPEC := myplc-devel-native.spec
-myplc-devel-native-SPECVARS := distroname=$(DISTRO) distrorelease=$(RELEASE)
 #ALL += myplc-devel-native