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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon May 25 12:42:53 CEST 2009


Revision: 5039
          http://gar.svn.sourceforge.net/gar/?rev=5039&view=rev
Author:   dmichelsen
Date:     2009-05-25 10:42:53 +0000 (Mon, 25 May 2009)

Log Message:
-----------
mGAR v2-pbuild: Enhance multitail usage

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

Modified: csw/mgar/gar/v2-pbuild/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.conf.mk	2009-05-25 02:24:33 UTC (rev 5038)
+++ csw/mgar/gar/v2-pbuild/gar.conf.mk	2009-05-25 10:42:53 UTC (rev 5039)
@@ -35,6 +35,11 @@
 GIT_PROXY_SCRIPT ?= $(abspath $(GARBIN))/gitproxy
 GIT_DEFAULT_TRACK = +refs/heads/master:refs/remotes/origin/master
 
+# For parallel builds
+PARALLELMODULATIONS ?= 
+MULTITAIL ?= /opt/csw/bin/multitail
+TTY ?= /usr/bin/tty
+
 # Outbound proxies
 http_proxy ?= 
 ftp_proxy  ?= 

Modified: csw/mgar/gar/v2-pbuild/gar.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.mk	2009-05-25 02:24:33 UTC (rev 5038)
+++ csw/mgar/gar/v2-pbuild/gar.mk	2009-05-25 10:42:53 UTC (rev 5039)
@@ -598,18 +598,26 @@
 _PAX_ARGS = $(_INC_EXT_RULE) $(EXTRA_PAX_ARGS)
 
 # The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge $(if $(shell tty >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo TERMINAL; fi),merge-parallel,merge-sequential) merge-license $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
+merge: checksum pre-merge merge-do merge-license $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
 	@$(DONADA)
 
+merge-do: $(if $(PARALLELMODULATIONS),merge-parallel,merge-sequential)
+
 merge-sequential: $(foreach M,$(MODULATIONS),merge-$M)
 
+merge-parallel: _PIDFILE=$(WORKROOTDIR)/build-global-$(GARCH)/multitail.pid
 merge-parallel: merge-watch
-	@$(foreach M,$(MODULATIONS),$(MAKE) merge-$M >$(WORKROOTDIR)/build-$M/build.log 2>&1 &) wait
-	@kill `cat $(WORKROOTDIR)/build-global-$(GARCH)/multitail.pid` && stty sane
+	$(_DBG_MERGE)$(foreach M,$(MODULATIONS),$(MAKE) merge-$M >$(WORKROOTDIR)/build-$M/build.log 2>&1 &) wait
+	$(_DBG_MERGE)if [ -f $(_PIDFILE) ]; then kill `cat $(_PIDFILE)` && stty sane; fi
 
+merge-watch: _USEMULTITAIL=$(shell test -x $(MULTITAIL) && test -x $(TTY) && $(TTY) >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo yes; fi)
 merge-watch:
-	@multitail --retry-all $(foreach M,$(MODULATIONS),$(WORKROOTDIR)/build-$M/build.log) -j & echo $$! > $(WORKROOTDIR)/build-global-$(GARCH)/multitail.pid
+	$(_DBG_MERGE)$(if $(_USEMULTITAIL),\
+		$(MULTITAIL) --retry-all $(foreach M,$(MODULATIONS),$(WORKROOTDIR)/build-$M/build.log) -J & echo $$! > $(WORKROOTDIR)/build-global-$(GARCH)/multitail.pid,\
+		echo "Building all ISAs in parallel. Please see the individual logfiles for details:";$(foreach M,$(MODULATIONS),echo "- $(WORKROOTDIR)/build-$M/build.log";)\
+	)
 
+
 # This merges the 
 merge-modulated: install-modulated pre-merge-modulated pre-merge-$(MODULATION) $(MERGE_TARGETS) post-merge-$(MODULATION) post-merge-modulated
 	@$(MAKECOOKIE)


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