diff: library/Mmakefile & termination analysis

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jan 25 04:18:19 AEDT 1998


Estimated hours taken: 0.5

library/Mmakefile:
	When building the library, enable transitive intermodule
	optimization and enable termination analysis, and make sure the
	library `.trans_opt' files get installed.  This is needed to
	enable users to get the full benefits of transitive intermodule
	optimization and termination analysis for programs that make
	use of the standard library.  Without this, termination analysis
	can't infer termination of "hello world".

cvs diff  library/Mmakefile
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.19
diff -u -r1.19 Mmakefile
--- Mmakefile	1997/11/06 06:19:22	1.19
+++ Mmakefile	1998/01/23 17:24:01
@@ -41,20 +41,34 @@
 		MERCURY_SP_OVERRIDING_LIB_OBJS="$(NU_OVERRIDING_LIBRARY_QLS)" \
 		$(SCRIPTS_DIR)/msl
 
+INTERMODULE_OPTS = --transitive-intermodule-optimization
+ENABLE_TERM_OPTS = --enable-termination
+# CHECK_TERM_OPTS = --check-termination
+
 MCD	=	MERCURY_INT_DIR=. \
 		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
-			--generate-dependencies --intermodule-optimization
+			--generate-dependencies $(INTERMODULE_OPTS)
 MCI	=	MERCURY_INT_DIR=. \
 		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
-			--make-interface --intermodule-optimization
+			--make-interface $(INTERMODULE_OPTS) \
+			$(ENABLE_TERM_OPTS)
+MCOI	=	MERCURY_INT_DIR=. \
+		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
+			--make-opt-int $(INTERMODULE_OPTS) \
+			$(ENABLE_TERM_OPTS)
+MCTOI	=	MERCURY_INT_DIR=. \
+		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
+			--make-trans-opt $(INTERMODULE_OPTS) \
+			$(ENABLE_TERM_OPTS)
 MCG	=	MERCURY_INT_DIR=. \
 		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
-			--compile-to-c --intermodule-optimization
+			--compile-to-c $(INTERMODULE_OPTS) \
+			$(CHECK_TERM_OPTS)
 MCS	=	MERCURY_INT_DIR=. \
 		MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(MC) \
 		--split-c-files -c \
 		--cflags "-I$(RUNTIME_DIR) -I$(BOEHM_GC_DIR) $(EXTRA_CFLAGS)" \
-		--intermodule-optimization
+		$(INTERMODULE_OPTS) $(CHECK_TERM_OPTS)
 MGNUC	=	MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(SCRIPTS_DIR)/mgnuc
 MGNUCFLAGS =	-I$(RUNTIME_DIR) -I$(BOEHM_GC_DIR) \
 		$(DLL_CFLAGS) $(EXTRA_CFLAGS)
@@ -126,6 +140,10 @@
 opts		: library.opts
 library.opts	: $(library.opts)
 
+.PHONY: trans_opts 
+trans_opts		: library.trans_opts
+library.trans_opts	: $(library.trans_opts)
+
 #-----------------------------------------------------------------------------#
 
 library.nu.nl: library.nu.nl.in ../VERSION ../Mmake.common
@@ -252,9 +270,12 @@
 install_mercury: install_ints install_init install_library
 
 .PHONY: install_ints
-install_ints: $(library.ints) $(library.int3s) $(library.opts)
+install_ints: $(library.ints) $(library.int3s) \
+		$(library.opts) $(library.trans_opts)
 	[ -d $(INSTALL_INT_DIR) ] || mkdir -p $(INSTALL_INT_DIR)
-	for file in $(library.ints) $(library.int3s) $(library.opts); do \
+	for file in $(library.ints) $(library.int3s) 
+			$(library.opts) $(library.trans_opts); \
+	do \
 		target=$(INSTALL_INT_DIR)/`basename $$file`; \
 		if cmp -s $$file $$target; then \
 			echo "$$target unchanged"; \

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list