X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=fd7f8d94dfb681386101a07099953bac36c436dd;hb=b3bb0258c6c4b9676df5931a060a90bd11f7a554;hp=f50660502e5e107dd725b467011315142632eabd;hpb=3cb7dc4d5986c15fa706651da6a6349e288425ef;p=build.git diff --git a/Makefile b/Makefile index f5066050..fd7f8d94 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ PLANETLAB_RELEASE = 4.2 HOSTARCH := $(shell uname -i) DISTRO := $(shell ./getdistro.sh) RELEASE := $(shell ./getrelease.sh) +DISTRONAME := $(shell ./getdistroname.sh) RPM-INSTALL-DEVEL := rpm --force -Uvh # cannot force rpm -e RPM-UNINSTALL-DEVEL := rpm -e @@ -207,6 +208,7 @@ define stage1_variables $(1).spec = $(notdir $($(1)-SPEC)) $(1).specpath = SPECS/$(1).spec $(1).module = $(firstword $($(1)-MODULES)) +$(1)-SVNPATH = $(strip $($(1)-SVNPATH)) endef $(foreach package, $(ALL), $(eval $(call stage1_variables,$(package)))) @@ -219,9 +221,9 @@ $(foreach package, $(ALL), $(eval $(call stage1_variables,$(package)))) # define package_hasdate $(1).has-date = $(if $(subst myplc,,$(1)), \ - $(if $($(1)-SVNPATH),\ - $(if $(findstring /trunk,$($(1)-SVNPATH)),yes,),\ - $(if $(findstring HEAD,$($(1)-TAG)),yes,)), \ + $(if $($($(1).module)-SVNPATH),\ + $(if $(findstring /trunk,$($($(1).module)-SVNPATH)),yes,),\ + $(if $(findstring HEAD,$($($(1).module)-TAG)),yes,)), \ yes) endef @@ -232,8 +234,9 @@ define target_spec $($(1).specpath): mkdir -p SPECS (echo -n "# Generated by planetlab build from $($(1)-SPEC) on " ; date) > $($(1).specpath) - echo "%define distroname $(DISTRO)" >> $($(1).specpath) + echo "%define distro $(DISTRO)" >> $($(1).specpath) echo "%define distrorelease $(RELEASE)" >> $($(1).specpath) + echo "%define distroname $(DISTRONAME)" >> $($(1).specpath) echo "%define pldistro $(PLDISTRO)" >> $($(1).specpath) echo "%define plrelease $(PLANETLAB_RELEASE)" >> $($(1).specpath) $(if $($(1).has-date),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1).specpath),) @@ -582,14 +585,15 @@ myplc-release: version-build: @echo -n 'Build build-date: ' ; date '+%Y.%m.%d' - @echo -n 'Build build-time: ' ; date '+%H:%M' + @echo -n 'Build build-time: ' ; date '+%H:%M-%Z' @echo -n 'Build build-hostname: ' ; hostname @echo "Build build-base: $(NIGHTLY_BASE)" - @echo "Build planetab-distro: $(PLDISTRO)" + @echo "Build planetlab-distro: $(PLDISTRO)" @echo "Build planetlab-tags: $(PLDISTROTAGS)" @echo -n 'Build planetlab-tagsid: ' ; fgrep '$$''Id' $(PLDISTROTAGS) @echo "Build target-arch: $(HOSTARCH)" @echo "Build target-distro: $(DISTRO)" + @echo "Build target-distroname: $(DISTRONAME)" @echo "Build target-release: $(RELEASE)" @echo "Build target-personality: $(NIGHTLY_PERSONALITY)"