[m-dev.] diff: makebatch
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Aug 24 12:32:12 AEST 1999
Estimated hours taken: 0.5
tools/makebatch:
Add the capability to include an arbitrary Mmakefile fragment
in the generated Mmake.params file.
Zoltan.
cvs diff: Diffing .
Index: makebatch
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/makebatch,v
retrieving revision 1.10
diff -u -b -r1.10 makebatch
--- makebatch 1999/08/23 05:32:57 1.10
+++ makebatch 1999/08/24 01:48:30
@@ -3,14 +3,19 @@
# A program to prepare batches of versions of the compiler.
#
# The control and output files are all in the subdirectory batch.
-# The control files are $batch.MCFLAGS and possibly $batch.CFLAGS
-# and/or $batch.GRADE, where $batch is the last argument of makebatch.
-# $batch.CFLAGS and $batch.GRADE are consulted if they exist.
+# The control files are $batch.MCFLAGS and possibly $batch.CFLAGS,
+# $batch.GRADE, and/or $batch.MMAKE, where $batch is the last argument
+# of makebatch. $batch.CFLAGS, $batch.GRADE and $batch.MMAKE are consulted
+# if they exist.
#
-# All the control files must have the same number of lines. Each line
-# corresponds to a version of the compiler that is built with the
-# MCFLAGS, EXTRA_CFLAGS and GRADE make variables being set from that line.
+# The control files $batch.MCFLAGS, $batch.CFLAGS and $batch.GRADE must have
+# the same number of lines. Each line corresponds to a version of the compiler
+# that is built with the MCFLAGS, EXTRA_CFLAGS and GRADE make variables
+# being set from that line.
#
+# The control file $batch.MMAKE contains an Mmakefile fragment that is
+# included in the parameters of all the versions being built.
+#
# The output goes in $batch.mercury_compile.$n.gz; the sizes of the versions
# are put in $batch.sizes. If a bootcheck fails, the bootcheck output goes
# in $batch.out.$n; the compiler will be thrown away unless the -f flag is
@@ -85,6 +90,13 @@
needgrade=false
fi
+if test -r batch/$batch.MMAKE
+then
+ needmmake=true
+else
+ needmmake=false
+fi
+
if test -f Mmake.stage.params
then
echo moving Mmake.stage.params to Mmake.stage.params.$$
@@ -103,16 +115,23 @@
while test $n -le $maxn
do
+ if $needmmake
+ then
+ cp batch/$batch.MMAKE Mmake.stage.params
+ else
+ cat < /dev/null > Mmake.stage.params
+ fi
+
mcflags=`awk "NR == $n" batch/$batch.MCFLAGS`
- echo "EXTRA_MCFLAGS = $mcflags" > Mmake.stage.params
+ echo "EXTRA_MCFLAGS = $mcflags" >> Mmake.stage.params
- if test "$needcflags" = true
+ if $needcflags
then
cflags=`awk "NR == $n" batch/$batch.CFLAGS`
echo "EXTRA_CFLAGS = $cflags" >> Mmake.stage.params
fi
- if test "$needgrade" = true
+ if $needgrade
then
grade=`awk "NR == $n" batch/$batch.GRADE`
echo "GRADE = $grade" >> Mmake.stage.params
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list