[csw-devel] SF.net SVN: gar:[6299] csw/mgar/gar/v2-pbuild

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sun Sep 13 23:39:26 CEST 2009


Revision: 6299
          http://gar.svn.sourceforge.net/gar/?rev=6299&view=rev
Author:   dmichelsen
Date:     2009-09-13 21:39:26 +0000 (Sun, 13 Sep 2009)

Log Message:
-----------
mGAR v2-pbuild: Add validatateplatform and platforms targets

Modified Paths:
--------------
    csw/mgar/gar/v2-pbuild/gar.mk
    csw/mgar/gar/v2-pbuild/gar.pkg.mk

Modified: csw/mgar/gar/v2-pbuild/gar.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.mk	2009-09-13 20:39:44 UTC (rev 6298)
+++ csw/mgar/gar/v2-pbuild/gar.mk	2009-09-13 21:39:26 UTC (rev 6299)
@@ -178,11 +178,9 @@
 $(call _modulate_target,configure,$(2),$(4))
 $(call _modulate_target_nocookie,reset-configure,$(2),$(4))
 $(call _modulate_target,build,$(2),$(4))
-#$(call _modulate_build,,$(2),$(4))
 $(call _modulate_target_nocookie,reset-build,$(2),$(4))
 $(call _modulate_target,test,$(2),$(4))
 $(call _modulate_target,install,$(2),$(4))
-#$(call _modulate_install,,$(2),$(4))
 $(call _modulate_target_nocookie,reset-install,$(2),$(4))
 #$(call _modulate_target,merge,$(2),$(4))
 $(call _modulate_merge,,$(2),$(4))

Modified: csw/mgar/gar/v2-pbuild/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.pkg.mk	2009-09-13 20:39:44 UTC (rev 6298)
+++ csw/mgar/gar/v2-pbuild/gar.pkg.mk	2009-09-13 21:39:26 UTC (rev 6299)
@@ -537,17 +537,21 @@
 # They will include binaries for all ISAs that are specified for the platform.
 PACKAGING_PLATFORMS ?= solaris8-sparc solaris8-i386
 
-# Only override for testing purposes
-THIS_PLATFORM ?= solaris$(shell uname -r | sed -e 's/5.//')-$(shell uname -p)
+validateplatform:
+	$(if $(filter $(THISHOST),$(foreach P,$(PACKAGING_PLATFORMS),$(PACKAGING_HOST_$P))),,\
+		$(warning ***)\
+		$(warning *** You are building this package on a non-requested platform host '$(THISHOST)'. The follow platforms were requested:)\
+		$(foreach P,$(PACKAGING_PLATFORMS),\
+			$(warning *** - $P $(if $(PACKAGING_HOST_$P),to be build on host '$(PACKAGING_HOST_$P)',with no suitable host available))\
+		)\
+		$(warning *** You can execute '$(MAKE) platforms' to automatically build on all necessary platforms.)\
+		$(warning ***)\
+	)
 
-ifeq (,$(filter $(THIS_PLATFORM),$(PACKAGING_PLATFORMS)))
-  $(warn *** You are building a package on a non-requested platform ($(THIS_PLATFORM)). Requested platforms were $(PACKAGING_PLATFORMS))
-endif
-
 # We depend on extract as the additional package files (like .gspec) must be
 # unpacked to global/ for packaging. E. g. 'merge' depends only on the specific
 # modulations and does not fill global/.
-package: extract merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package
+package: validateplatform extract merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package
 	$(DONADA)
 
 # The dynamic pkginfo is only generated for dynamic gspec-files
@@ -596,6 +600,19 @@
 
 repackage: pkgreset package
 
+# This rule automatically logs into every host where a package for this software should
+# be built. It is especially suited for automated build bots.
+platforms:
+	$(foreach P,$(PACKAGING_PLATFORMS),\
+		$(if $(PACKAGING_HOST_$P),\
+			$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
+				$(MAKE) package;,\
+				ssh $(PACKAGING_HOST_$P) "$(MAKE) -C $(CURDIR) package";\
+			),\
+			$(error *** No host has been defined for platform $P)\
+		)\
+	)
+
 # dependb - update the dependency database
 #
 dependb:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list