diff: library.init warning fix

Fergus Henderson fjh at cs.mu.oz.au
Mon Jul 21 03:42:38 AEST 1997


Fix a warning about the rule for making `library/library.init'
clashing with the default rule for creating a `.init' file
in the automatically-generated `library/library.dep' file.
The initialization for the library is different to the
standard automatically-generated initialization, because
the library contains C code that needs explicit initialization.
(because it has BEGIN_MODULE ... END_MODULE macros in it); this
C code hence has `INIT blah' comments in it naming functions that
need to be inserted in the `.init' file so that they will be called
at initialization time.

Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
	s/library.init/libmercury.init/g

Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/Mmakefile,v
retrieving revision 1.2
diff -u -r1.2 Mmakefile
--- Mmakefile	1997/06/10 02:19:06	1.2
+++ Mmakefile	1997/07/20 17:23:14
@@ -156,7 +156,7 @@
 	cd util && mmake
 	cd runtime && $(SUBDIR_MMAKE) cs runtime.init
 	cd library && $(SUBDIR_MMAKE) depend
-	cd library && $(SUBDIR_MMAKE) ints opts cs library.init tags
+	cd library && $(SUBDIR_MMAKE) ints opts cs libmercury.init tags
 	cd compiler && $(SUBDIR_MMAKE) depend
 	cd compiler && $(SUBDIR_MMAKE) ints cs tags
 	cd profiler && $(SUBDIR_MMAKE) depend
Index: library/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/Mmakefile,v
retrieving revision 1.6
diff -u -r1.6 Mmakefile
--- Mmakefile	1997/07/01 04:04:26	1.6
+++ Mmakefile	1997/07/20 17:27:28
@@ -130,7 +130,7 @@
 # the following dependency is just there to improve compilation speed;
 # making tree234.o first improves effective parallelism with parallel makes.
 libmercury : tree234.o
-libmercury : libmercury.a libmercury.$(EXT_FOR_SHARED_LIB) library.init
+libmercury : libmercury.a libmercury.$(EXT_FOR_SHARED_LIB) libmercury.init
 
 libmercury.a : $(library.os)
 	rm -f libmercury.a
@@ -152,11 +152,11 @@
 		`							\
 		$(SHARED_LIBS)
 
-library.init: library.dep
+libmercury.init: library.dep
 	for file in $(library.ms); do \
 		grep '^INIT ' $$file; \
 		echo "INIT mercury__`basename $$file .m`__init"; \
-	done > library.init
+	done > libmercury.init
 
 #-----------------------------------------------------------------------------#
 
@@ -212,7 +212,7 @@
 	rm -f *.no *.ql
 
 realclean:
-	rm -f libmercury.a libmercury.so library.init
+	rm -f libmercury.a libmercury.so libmercury.init
 	rm -f sicstus_saved_state sicstus_compile sp_builtin.pl
 
 #-----------------------------------------------------------------------------#
@@ -245,9 +245,9 @@
 	done
 
 .PHONY: install_init
-install_init: library.init
+install_init: libmercury.init
 	[ -d $(INSTALL_MODULE_DIR) ] || mkdir -p $(INSTALL_MODULE_DIR)
-	cp `vpath_find library.init` $(INSTALL_MODULE_DIR)
+	cp `vpath_find libmercury.init` $(INSTALL_MODULE_DIR)
 
 .PHONY: install_library
 install_library: libmercury.a libmercury.$(EXT_FOR_SHARED_LIB)
Index: compiler/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/Mmakefile,v
retrieving revision 1.1
diff -u -r1.1 Mmakefile
--- Mmakefile	1997/02/13 21:38:21	1.1
+++ Mmakefile	1997/07/20 17:29:14
@@ -25,7 +25,7 @@
 MGNUC	=	MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(SCRIPTS_DIR)/mgnuc
 MGNUCFLAGS =	-I$(BOEHM_GC_DIR) $(EXTRA_CFLAGS)
 C2INIT =	\
-MERCURY_MOD_LIB_MODS="$(RUNTIME_DIR)/runtime.init $(LIBRARY_DIR)/library.init" \
+MERCURY_MOD_LIB_MODS="$(RUNTIME_DIR)/runtime.init $(LIBRARY_DIR)/libmercury.init" \
 		MERCURY_MKINIT=$(UTIL_DIR)/mkinit $(SCRIPTS_DIR)/c2init
 ML	=	MERCURY_C_LIB_DIR=. $(SCRIPTS_DIR)/ml
 MLFLAGS =	--mercury-libs none $(EXTRA_MLFLAGS)
Index: profiler/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/profiler/Mmakefile,v
retrieving revision 1.1
diff -u -r1.1 Mmakefile
--- Mmakefile	1997/02/13 21:38:34	1.1
+++ Mmakefile	1997/07/20 17:29:43
@@ -24,7 +24,7 @@
 MGNUC	=	MERCURY_C_INCL_DIR=$(RUNTIME_DIR) $(SCRIPTS_DIR)/mgnuc
 MGNUCFLAGS =	-I$(BOEHM_GC_DIR) $(EXTRA_CFLAGS)
 C2INIT =	\
-MERCURY_MOD_LIB_MODS="$(RUNTIME_DIR)/runtime.init $(LIBRARY_DIR)/library.init" \
+MERCURY_MOD_LIB_MODS="$(RUNTIME_DIR)/runtime.init $(LIBRARY_DIR)/libmercury.init" \
 		MERCURY_MKINIT=$(UTIL_DIR)/mkinit $(SCRIPTS_DIR)/c2init
 ML	=	MERCURY_C_LIB_DIR=. $(SCRIPTS_DIR)/ml
 MLFLAGS =	--mercury-libs none $(EXTRA_MLFLAGS)

-- 
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