diff: put library files in current dir

Fergus Henderson fjh at cs.mu.OZ.AU
Sat May 30 17:37:39 AEST 1998


Estimated hours taken: 1

compiler/modules.m:
	Put library files and `.init' files in the current directory,
	rather than in Mercury/libs and Mercury/inits subdirectories,
	even if `--use-subdirs' is enabled.
	Without this change, the instructions on "Using libraries"
	in the Mercury user's guide did not work in conjunction with
	`--use-subdirs', and they, as well as a lot of Mmakefiles that
	were defined based on them, would need to be changed.

cvs diff  compiler/modules.m
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.75
diff -u -r1.75 modules.m
--- modules.m	1998/05/29 08:50:45	1.75
+++ modules.m	1998/05/29 21:21:18
@@ -476,6 +476,7 @@
 	;
 		%
 		% the source files, the final executables,
+		% library files (including .init files)
 		% output files intended for use by the user,
 		% and phony Mmake targets names go in the current directory
 		%
@@ -487,6 +488,14 @@
 		; Ext = ".nu.debug"
 		; Ext = ".sicstus"
 		; Ext = ".sicstus.debug"
+		% library files
+		; Ext = ".a"
+		; Ext = ".so"
+		; Ext = ".$(EXT_FOR_SHARED_LIB)"
+		; Ext = ".split.a"
+		; Ext = ".split.so"
+		; Ext = ".split.$(EXT_FOR_SHARED_LIB)"
+		; Ext = ".init"
 		% output files intended for use by the user
 		; Ext = ".h"
 		; Ext = ".err"
@@ -517,19 +526,6 @@
 			Ext = ".dir/*.o"
 		->
 			SubDirName = "dirs"
-		;
-			% .a and .so files need to go in the same
-			% directory, so that using .$(EXT_FOR_SHARED_LIB)
-			% will work
-			( Ext = ".a"
-			; Ext = ".so"
-			; Ext = ".$(EXT_FOR_SHARED_LIB)"
-			; Ext = ".split.a"
-			; Ext = ".split.so"
-			; Ext = ".split.$(EXT_FOR_SHARED_LIB)"
-			)
-		->
-			SubDirName = "libs"
 		;
 			% .o and .pic_o files need to go in the
 			% same directory, so that using

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