[m-dev.] diff: fixes for c_interface Mmakefiles

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jan 25 00:47:18 AEDT 2001


Estimated hours taken: 1

Fix some bugs in samples/c_interface/*/Mmakefile.

samples/c_interface/simpler_c_calls_mercury/Mmakefile:
	Use $(mercury_lib.os) rather than hard-coding mercury_lib.o,
	so that it works if we compile mercury_lib to more than one
	object file, as we do for the `--target asm' case.

samples/c_interface/c_calls_mercury/Mmakefile:
	Pass $(ALL_GRADEFLAGS) to $(ML).
	Also use $(ALL_MLFLAGS) rather than $(MLFLAGS).

Workspace: /home/hg/fjh/gcc-cvs/gcc/mercury
Index: samples/c_interface/c_calls_mercury/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/samples/c_interface/c_calls_mercury/Mmakefile,v
retrieving revision 1.4
diff -u -d -r1.4 Mmakefile
--- samples/c_interface/c_calls_mercury/Mmakefile	2000/02/03 05:13:10	1.4
+++ samples/c_interface/c_calls_mercury/Mmakefile	2001/01/24 13:43:35
@@ -13,7 +13,7 @@
 MLFLAGS=-g
 
 # tell the Mercury linker to link in c_main.o and mercury_lib.o
-MLOBJS=c_main.o mercury_lib.o
+MLOBJS=c_main.o $(mercury_lib.os)
 
 #-----------------------------------------------------------------------------#
 
@@ -21,7 +21,7 @@
 
 # to make mercury_lib.h, just compile mercury_lib.m;
 # the Mercury compiler will create mercury_lib.h as a side-effect.
-mercury_lib.h: mercury_lib.o
+mercury_lib.h: $(mercury_lib.os)
 
 # make sure that `mmake clean' removes c_main.o
 clean_local:
Index: samples/c_interface/simpler_c_calls_mercury/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/samples/c_interface/simpler_c_calls_mercury/Mmakefile,v
retrieving revision 1.4
diff -u -d -r1.4 Mmakefile
--- samples/c_interface/simpler_c_calls_mercury/Mmakefile	2000/02/14 05:27:55	1.4
+++ samples/c_interface/simpler_c_calls_mercury/Mmakefile	2001/01/24 12:56:56
@@ -12,7 +12,7 @@
 LIBSLINK = libmercury_lib.a
 
 c_main: $(OBJECTS) $(LIBS)
-	$(ML) $(MLFLAGS) -o c_main $(OBJECTS) $(LIBSLINK)
+	$(ML) $(ALL_GRADEFLAGS) $(ALL_MLFLAGS) -o c_main $(OBJECTS) $(LIBSLINK)
 
 #-----------------------------------------------------------------------------#
 

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