🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #737

Re: parallel make

#737
From: pwolfe
Date: Tue, 10 Jan 1989 13:03
69 lines
2543 bytes
Right!  Encore's "make" doesn't need Makefile modifications to run in
parallel, (Encore Computer Systems, that is, not Encore International) so why
does Sequent's?  I have looked at the source code to GNU Make, and wouldn't
like to take on the task of adding the feature to it.

I have to maintain Makefile for both Sequent and non-Sequent environments,
and to get around this, put a macro definition $(P) whereever I would normally
put the '&' in a Makefile on the Sequent.  I have a shell script "mk" which I
use to run "make" which on Sequent hosts passes P='&' and on the other guys
doesn't.

Here's my "mk" script.  It puts make output into a file named "mklog", along
with date/time make started and stopped, userid and cwd of person who ran
"mk", and hostname the make is running on (useful because we have a Balance
and Symmetry sharing disks via NFS, and you can't mix object modules between
the two).  The "-a" option causes the current "mklog" to be appended to.


#!/bin/sh
#	mk [ -a ] [ make-options ]

PATH=$HOME/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin
export PATH
FILEOUT=mklog
HOST=`hostname`

#	-a option appends output to the log file
#	by default, the old log file is deleted
if [ "x$1" = "x-a" ]; then
	shift
else
	rm -f $FILEOUT
fi

#	put some info in the log file
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $FILEOUT
echo "`whoami`@`hostname`:`pwd`" >> $FILEOUT
echo "`date`  started make $*" >> $FILEOUT

#	Sequent hosts have "ATTPATH" environment variable defined
#	whether you have SVAE installed or not!
if [ "x$ATTPATH" = "x" ]; then
	make $* >> $FILEOUT 2>&1
	mkstatus=$?
else
	#	use parallel make on Sequent hosts
	if [ "$PARALLEL" = "" ]; then
		#	default to 2 processes
		PARALLEL=2
		export PARALLEL
	fi
	make $* "P=&" >> $FILEOUT 2>&1
	mkstatus=$?
fi

#	print ending message
AMSG="`date`  mk $*"
if [ $mkstatus -eq 0 ]; then
	BMSG=""
else
	BMSG=" with status $mkstatus"
	fi
echo "${AMSG}${BMSG}" >> $FILEOUT
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $FILEOUT

#	the following line contains a control-G
echo "${AMSG}${BMSG}"
exit $mkstatus
Technical Details
Message-ID: <2400031@kailand>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!kailand!pwolfe
References: <1468@fai.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!kailand!pwolfe
From: pwolfe@kailand.KAI.COM
Newsgroups: comp.sys.sequent
Subject: Re: parallel make
Message-ID: <2400031@kailand>
Date: 10 Jan 89 13:03:00 GMT
References: <1468@fai.UUCP>
Lines: 69
Nf-ID: #R:fai.UUCP:1468:kailand:2400031:000:2071
Nf-From: kailand.KAI.COM!pwolfe    Jan 10 07:03:00 1989