updated after planetlab syncs up with 5.0
[build.git] / Makefile
index 13a3f13..a41537c 100644 (file)
--- a/Makefile
+++ b/Makefile
 ####################
 
 # exported to spec files as plrelease
-PLANETLAB_RELEASE = 4.3
+PLANETLAB_RELEASE = 5.0
 
 #
 # Default values
@@ -147,7 +147,9 @@ include $(PLDISTROCONTENTS)
 
 #################### include <pldistro>-tags.mk
 # describes where to fetch components, and the related tags if using cvs
+ifeq "$(PLDISTROTAGS)" ""
 PLDISTROTAGS := $(PLDISTRO)-tags.mk
+endif
 include $(PLDISTROTAGS)
 
 # this used to be set in the -tags.mk files, but that turned out to require
@@ -313,6 +315,11 @@ header.spec:
        echo "%define distroname $(DISTRONAME)" >> $@
        echo "%define pldistro $(PLDISTRO)" >> $@
        echo "%define plrelease $(PLANETLAB_RELEASE)" >> $@
+       echo "# use MD5 and gzip for binary and source files" << $@
+       echo "%global _binary_filedigest_algorithm 1" >> $@
+       echo "%global _source_filedigest_algorithm 1" >> $@
+       echo "%global _source_payload       w9.gzdio" >> $@
+       echo "%global _binary_payload       w9.gzdio" >> $@
 
 ### extract spec file from scm
 define target_spec
@@ -373,16 +380,15 @@ $(foreach package,$(ALL),$(eval $(call target_mk,$(package))))
 
 # stores PLDISTRO in a file
 # this is done at stage1. later run wont get confused
+SAVED_VARS=PLDISTRO PLDISTROTAGS build-SVNPATH PERSONALITY MAILTO BASE WEBPATH TESTBUILDURL WEBROOT
 savedpldistro.mk:
-       echo "PLDISTRO:=$(PLDISTRO)" > $@
-       echo "PLDISTROTAGS:=$(PLDISTROTAGS)" >> $@
-       echo "build-SVNPATH:=$(build-SVNPATH)" >> $@
-       echo "PERSONALITY:=$(PERSONALITY)" >> $@
-       echo "MAILTO:=$(MAILTO)" >> $@
-       echo "BASE:=$(BASE)" >> $@
-       echo "WEBPATH:=$(WEBPATH)" >> $@
-       echo "TESTBUILDURL:=$(TESTBUILDURL)" >> $@
-       echo "WEBROOT:=$(WEBROOT)" >> $@
+       @echo "# do not edit" > $@
+       @$(foreach var,$(SAVED_VARS),echo "$(var):=$($(var))" >> $@ ;)
+       @echo "# do not edit" > aliases
+       @echo -n "alias m=\"make " >> aliases
+       @$(foreach var,$(SAVED_VARS),echo -n " $(var)=$($(var))" >> aliases ;)
+       @echo "\"" >> aliases
+       @echo "alias m1=\"m stage1=true\"" >> aliases
 
 savedpldistro: savedpldistro.mk
 .PHONY: savedpldistro