From: Thierry Parmentelat Date: Fri, 9 Feb 2007 01:16:19 +0000 (+0000) Subject: merges changes from planetlab.mk X-Git-Tag: 4.2-rc2~651 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1f0974fd907f2245f2e85bc6be090093f6944037;p=build.git merges changes from planetlab.mk --- diff --git a/Rules.mk b/Rules.mk index 41b84837..a93c28e5 100644 --- a/Rules.mk +++ b/Rules.mk @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2006 The Trustees of Princeton University # -# $Id: Rules.mk,v 1.26 2007/01/23 06:42:44 mlhuang Exp $ +# $Id: Rules.mk,v 1.27 2007/01/29 19:18:45 thierry Exp $ # # Base rpmbuild in the current directory @@ -27,7 +27,10 @@ else # Define cvstag for tagged builds echo "%define cvstag $(TAG)" >> $@ endif - cvs -d $(CVSROOT) checkout -r $(TAG) -p $(SPEC) >> $@ + $(if $($(package)-SVNPATH),\ + svn cat $($(package)-SVNPATH)/$(SPEC) >> $@,\ + cvs -d $(CVSROOT) checkout -r $(TAG) -p $(SPEC) >> $@) + # # Parse spec file into Makefile fragment @@ -61,7 +64,8 @@ $(patsubst %.tar,%,$(1)))))) SOURCEDIRS := $(call stripext,$(SOURCES)) # Thierry - Jan 29 2007 -# Allow different modules to have different CVSROOT's +# Allow different modules to have different CVSROOT +# and/or to be extracted from their SVNPATH # # is there a single module ? to mimick cvs export -d behaviour MULTI_MODULE := $(word 2,$(MODULE)) @@ -69,14 +73,18 @@ ifeq "$(MULTI_MODULE)" "" # single module: do as before SOURCES/$(package): mkdir -p SOURCES - cd SOURCES && cvs -d $(CVSROOT) export -r $(TAG) -d $(package) $(MODULE) + $(if $($(package)-SVNPATH),\ + cd SOURCES && svn export $($(package)-SVNPATH) $(package),\ + cd SOURCES && cvs -d $(CVSROOT) export -r $(TAG) -d $(package) $(MODULE)) else # multiple modules : iterate SOURCES/$(package): mkdir -p SOURCES/$(package) && cd SOURCES/$(package) && (\ $(foreach module,$(MODULE),\ - cvs -d $(if $($(module)-CVSROOT),$($(module)-CVSROOT),$(CVSROOT)) export -r $(TAG) $(module);\ - )) + $(if $($(module)-SVNPATH, \ + svn export $($(module)-SVNPATH) $(module), \ + cvs -d $(if $($(module)-CVSROOT),$($(module)-CVSROOT),$(CVSROOT)) export -r $(TAG) $(module);\ + ))) endif # Make a hard-linked copy of the exported directory for each Source diff --git a/onelab.mk b/onelab.mk index a609632d..ac6b62ca 100644 --- a/onelab.mk +++ b/onelab.mk @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2006 The Trustees of Princeton University # -# $Id: onelab.mk,v 1.5 2007/01/30 15:56:08 thierry Exp $ +# $Id: onelab.mk,v 1.6 2007/01/30 17:46:10 thierry Exp $ # # @@ -96,8 +96,8 @@ madwifi-ng: kernel # wireless-tools-MODULE = wireless-tools -wireless-tools-SPEC := wireless-tools/wireless-tools.spec -wireless-tools-CVSROOT := /cvs +wireless-tools-SPEC := wireless-tools.spec +wireless-tools-SVNPATH := file:///svn/wireless-tools/29pre10 ALL += wireless-tools # @@ -117,14 +117,6 @@ util-vserver-SPEC := util-vserver/util-vserver.spec util-vserver-RPMFLAGS:= --without dietlibc ALL += util-vserver -# -# yum -# - -yum-MODULE := yum -yum-SPEC := yum/yum.spec -ALL += yum - # # PlanetLabAccounts # @@ -285,14 +277,6 @@ kexec-tools-MODULE := kexec-tools kexec-tools-SPEC := kexec-tools/kexec-tools.spec ALL += kexec-tools -# -# dhcp -# - -dhcp-MODULE := dhcp -dhcp-SPEC := dhcp/dhcp.spec -ALL += dhcp - # # util-python # @@ -306,22 +290,6 @@ proper: util-python util-vserver: util-python PlanetLabAuth: util-python -# -# PlanetLabAuth -# - -PlanetLabAuth-MODULE := pl_auth -PlanetLabAuth-SPEC := pl_auth/pl_auth.spec -ALL += PlanetLabAuth - -# -# plcapilib -# - -plcapilib-MODULE := plcmdline -plcapilib-SPEC := plcmdline/plcapilib.spec -ALL += plcapilib - # # PLCAPI # @@ -374,7 +342,7 @@ bootcd: $(filter-out bootcd,$(ALL)) # MyPLC # -myplc-MODULE := $(sort $(foreach module,$(ALL),$($(module)-MODULE)) myplc new_plc_www plc/scripts) +myplc-MODULE := build myplc new_plc_www plc/scripts myplc-SPEC := myplc/myplc.spec # Package must be built as root myplc-RPMBUILD := sudo rpmbuild