[m-rev.] for review: make `mmake --use-mmc-make' make the compiler again
Peter Wang
wangp at students.cs.mu.OZ.AU
Fri Dec 16 13:51:19 AEDT 2005
Estimated hours taken: 2
Branches: main
These changes allow the compiler to be built with `mmake --use-mmc-make'.
*/Mmakefile:
Add dummy rules for optional `Mmake.*.params' files so that
`mmc --make' is not asked to make them.
library/INTER_FLAGS_MMC_MAKE:
library/Mmakefile:
Add a version of the `library/INTER_FLAGS' file to be used when
`mmc --make' is being used.
library/LIB_FLAGS.in:
Add `--c-include-directory ../robdd' so that `mmc --make' can find
the included C files for `robdd.m'.
tools/bootcheck:
Make `bootcheck --use-mmc-make' imply `bootcheck --use-subdirs'.
Copy `INTER_FLAGS_MMC_MAKE' to stage 2 and stage 3 directories.
Manually make `*_FLAGS' files in the stage 2 directory if
`--use-mmc-make' is in effect.
Index: browser/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/Mmakefile,v
retrieving revision 1.47
diff -u -r1.47 Mmakefile
--- browser/Mmakefile 20 May 2005 06:15:06 -0000 1.47
+++ browser/Mmakefile 7 Dec 2005 04:04:22 -0000
@@ -30,6 +30,10 @@
include $(MERCURY_DIR)/Mmake.common
-include Mmake.browser.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file.
+Mmake.browser.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
Index: compiler/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.86
diff -u -r1.86 Mmakefile
--- compiler/Mmakefile 30 Jun 2005 05:59:35 -0000 1.86
+++ compiler/Mmakefile 7 Dec 2005 04:04:34 -0000
@@ -11,6 +11,10 @@
include $(MERCURY_DIR)/Mmake.common
-include Mmake.compiler.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file for us.
+Mmake.compiler.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
# Mercury.options uses $(GCC_SRC_DIR), so make sure it is
Index: deep_profiler/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/deep_profiler/Mmakefile,v
retrieving revision 1.15
diff -u -r1.15 Mmakefile
--- deep_profiler/Mmakefile 6 May 2005 08:42:11 -0000 1.15
+++ deep_profiler/Mmakefile 7 Dec 2005 04:02:29 -0000
@@ -12,6 +12,10 @@
-include Mmake.deep.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file.
+Mmake.deep.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
Index: library/INTER_FLAGS_MMC_MAKE
===================================================================
RCS file: library/INTER_FLAGS_MMC_MAKE
diff -N library/INTER_FLAGS_MMC_MAKE
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ library/INTER_FLAGS_MMC_MAKE 15 Dec 2005 07:13:58 -0000
@@ -0,0 +1,3 @@
+--intermodule-optimization
+--no-warn-smart-recompilation
+--analyse-exceptions
Index: library/LIB_FLAGS.in
===================================================================
RCS file: /home/mercury1/repository/mercury/library/LIB_FLAGS.in,v
retrieving revision 1.1
diff -u -r1.1 LIB_FLAGS.in
--- library/LIB_FLAGS.in 6 May 2005 08:42:14 -0000 1.1
+++ library/LIB_FLAGS.in 15 Dec 2005 23:11:13 -0000
@@ -10,6 +10,7 @@
--c-include-directory ../boehm_gc
--c-include-directory ../boehm_gc/include
--c-include-directory ../runtime
+--c-include-directory ../robdd
-L../boehm_gc
-L../runtime
-L../library
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.144
diff -u -r1.144 Mmakefile
--- library/Mmakefile 25 Oct 2005 10:17:27 -0000 1.144
+++ library/Mmakefile 15 Dec 2005 07:17:59 -0000
@@ -29,6 +29,10 @@
include $(MERCURY_DIR)/Mmake.common
-include Mmake.library.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file.
+Mmake.library.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
@@ -53,7 +57,13 @@
# If you want to actually check termination for the library, then you need
# to add --check-termination to INTER_FLAGS, but that is not enabled by default
# because it probably just results in spurious warnings.
+# A different flags file is used when `--use-mmc-make' is in effect as
+# some options are (currently) incompatible with `mmc --make'.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+INTER_FLAGS = --flags INTER_FLAGS_MMC_MAKE
+else
INTER_FLAGS = --flags INTER_FLAGS
+endif
else
Index: mdbcomp/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/mdbcomp/Mmakefile,v
retrieving revision 1.8
diff -u -r1.8 Mmakefile
--- mdbcomp/Mmakefile 20 May 2005 06:15:14 -0000 1.8
+++ mdbcomp/Mmakefile 7 Dec 2005 04:05:34 -0000
@@ -22,6 +22,10 @@
include $(MERCURY_DIR)/Mmake.common
-include Mmake.mdbcomp.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file.
+Mmake.mdbcomp.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
Index: slice/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/slice/Mmakefile,v
retrieving revision 1.3
diff -u -r1.3 Mmakefile
--- slice/Mmakefile 11 Aug 2005 15:56:59 -0000 1.3
+++ slice/Mmakefile 7 Dec 2005 04:03:49 -0000
@@ -12,6 +12,10 @@
-include Mmake.slice.params
+# Override the default rule in `mmake --use-mmc-make' that asks `mmc' to
+# create a missing optional params file.
+Mmake.slice.params:
+
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.177
diff -u -r1.177 bootcheck
--- tools/bootcheck 25 Nov 2005 05:40:55 -0000 1.177
+++ tools/bootcheck 15 Dec 2005 10:25:55 -0000
@@ -344,7 +344,7 @@
use_subdirs=no ;;
--use-mmc-make)
- use_mmc_make=yes ;;
+ use_mmc_make=yes; use_subdirs=yes ;;
--no-use-mmc-make)
use_mmc_make=no ;;
@@ -647,7 +647,7 @@
$LN_S $root/library/print_extra_inits .
cp $root/library/Mmake* $root/library/Mercury.options .
cp $root/library/*_FLAGS.in .
- cp $root/library/INTER_FLAGS .
+ cp $root/library/INTER_FLAGS* .
cp $root/library/.mgnu* .
$LN_S $root/library/$STD_LIB_NAME.init .
$LN_S $root/library/RESERVED_MACRO_NAMES .
@@ -856,6 +856,24 @@
exit 1
fi
+ case $use_mmc_make in
+ yes)
+ # The rules to generate *_FLAGS files from *_FLAGS.in files
+ # will not run if we are using `mmc --make' so run them now.
+ if (cd $stage2dir && \
+ $MMAKE compiler/COMP_FLAGS library/LIB_FLAGS \
+ mdbcomp/MDBCOMP_FLAGS analysis/ANALYSIS_FLAGS \
+ slice/SLICE_FLAGS profiler/PROF_FLAGS \
+ deep_profiler/DEEP_FLAGS)
+ then
+ echo "building of stage 2 flags files successful"
+ else
+ echo "building of stage 2 flags files not successful"
+ exit 1
+ fi
+ ;;
+ esac
+
if (cd $stage2dir && \
$MMAKE $mmake_opts dep_library dep_mdbcomp \
dep_browser dep_analysis dep_compiler dep_slice \
@@ -1083,7 +1101,7 @@
$LN_S $root/library/library_strong_name.sn .
cp $root/library/Mmake* $root/library/Mercury.options .
cp $root/library/*_FLAGS.in .
- cp $root/library/INTER_FLAGS .
+ cp $root/library/INTER_FLAGS* .
cp $root/library/.mgnu* .
$LN_S $root/library/$STD_LIB_NAME.init .
cd $root/$stage3dir
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list