PLDISTRO := planetlab
RPMBUILD := rpmbuild
-########## savedpldistro.mk holds PLDISTRO - it is generated at stage1 (see below)
+########## envfrompreviousrun.mk holds PLDISTRO and others - it is generated at stage1 (see below)
ifeq "$(stage1)" ""
-include savedpldistro.mk
+include envfrompreviousrun.mk
endif
# when re-running the nightly build after failure, we need to gather the former values
# do this by running make stage1=skip +PLDISTRO
ifeq "$(stage1)" "skip"
-include savedpldistro.mk
+include envfrompreviousrun.mk
endif
#################### include onelab.mk
# this used to be set in the -tags.mk files, but that turned out to require
# error-prone duplicate changes
# so now the nightly build script sets this to what it is currently using
-# in case we run this manually, i.e. if neither build-SVNPATH nor build-GITPATH is set
-ifeq "$(build-SVNPATH)$(build-GITPATH)" ""
-build-GITPATH-local := $(shell git config remote.origin.url)
-ifneq "$(build-GITPATH-local)" ""
-build-GITPATH := $(build-GITPATH-local)
-else
-build-SVNPATH := $(lastword $(shell svn info 2> /dev/null | grep URL:))
-endif
+# in case we run this manually, i.e. if build-GITPATH is not set
+ifeq "$(build-GITPATH)" ""
+build-GITPATH := $(shell git config remote.origin.url)
endif
#################### pldistros that are defined remotely
# stores env variables 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
+SAVED_VARS=PLDISTRO PLDISTROTAGS build-GITPATH PERSONALITY MAILTO BASE WEBPATH TESTBUILDURL WEBROOT
# also remember variable settings in alias, like sfa-GITPATH=git://git.f-lab.fr/sfa.git@generic
# but don't save stage1
-ASSIGNS=$(foreach chunk,$(MAKEFLAGS),$(if $(findstring =,$(chunk)),$(if $(findstring stage1,$(chunk)),,$(chunk)),,))
-savedpldistro.mk:
+ASSIGNS=$(foreach chunk,$(MAKEFLAGS),$(if $(findstring =,$(chunk)),$(if $(findstring stage1,$(chunk)),,$(chunk)),))
+envfrompreviousrun.mk:
@echo "# do not edit" > $@
@$(foreach var,$(SAVED_VARS),echo "$(var):=$($(var))" >> $@ ;)
+ @$(foreach chunk,$(ASSIGNS),echo "override $(chunk)" | sed -e s,=,:=, >> $@;)
@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
+envfrompreviousrun: envfrompreviousrun.mk
+.PHONY: envfrompreviousrun
# always refresh this
-all: savedpldistro
+all: envfrompreviousrun
#################### regular make
### brute force clean
distclean1:
- rm -rf savedpldistro.mk .rpmmacros spec2make header.spec SPECS MAKE $(DISTCLEANS)
+ rm -rf envfrompreviousrun.mk .rpmmacros spec2make header.spec SPECS MAKE $(DISTCLEANS)
distclean2:
rm -rf MODULES SOURCES BUILD BUILDROOT RPMS SRPMS tmp
distclean: distclean1 distclean2