diff: scripts/mmc.in: change handling of `-I'

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 5 14:38:49 AEDT 1998


scripts/mmc.in:
	Move the `-I $INTDIR' so that it goes *after* the user's arguments
	to mmc, rather than before.  This ensures that any directories that
	the user specifies using `-I' options are searched before the
	standard Mercury library directory, which is consistent with
	the way `-L' and `-R' options are currently handled.

	This patch is needed to allow `-I ..' specified in Mmakefile in
	extras/clpr/samples to work.  Otherwise, it uses the installed
	`.int' files, but links with the local (and potentially different)
	libraries, resulting in link errors.

Index: mmc.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/mmc.in,v
retrieving revision 1.4
diff -u -u -r1.4 mmc.in
--- mmc.in	1997/10/14 03:29:02	1.4
+++ mmc.in	1998/02/05 03:32:19
@@ -36,7 +36,8 @@
 # all the options that describe the machine configuration.
 
 case $# in
-	0) exec $MC -I "$INTDIR" --c-include-directory "$C_INCL" \
+	0) exec $MC \
+		--c-include-directory "$C_INCL" \
 		--cc "$CC" --grade "$DEFAULT_GRADE" \
 		--cflags-for-regs "$CFLAGS_FOR_REGS" \
 		--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
@@ -48,8 +49,10 @@
 		$HAVE_DELAY_SLOT \
 		$HAVE_BOXED_FLOATS \
 		$DEFAULT_OPT_LEVEL \
+		-I "$INTDIR"
 		;;
-	*) exec $MC -I "$INTDIR" --c-include-directory "$C_INCL" \
+	*) exec $MC \
+		--c-include-directory "$C_INCL" \
 		--cc "$CC" --grade "$DEFAULT_GRADE" \
 		--cflags-for-regs "$CFLAGS_FOR_REGS" \
 		--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
@@ -61,5 +64,7 @@
 		$HAVE_DELAY_SLOT \
 		$HAVE_BOXED_FLOATS \
 		$DEFAULT_OPT_LEVEL \
-		"$@" ;;
+		"$@" \
+		-I "$INTDIR"
+		;;
 esac

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