diff: fix problem with /usr/local/include & gc.h

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Apr 7 03:11:39 AEST 1999


Estimated hours taken: 0.5

scripts/mgnuc.in:
	Search /usr/local/include after any directories specified by
	the user, rather than before.  This is necessary to ensure
	that we pick up the right version of gc.h (there's another
	file called gc.h, quite different from boehm_gc/gc.h,
	which often resides in /usr/local/include).

Index: scripts/mgnuc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mgnuc.in,v
retrieving revision 1.61
diff -u -r1.61 mgnuc.in
--- mgnuc.in	1999/04/05 11:45:41	1.61
+++ mgnuc.in	1999/04/06 17:05:35
@@ -61,7 +61,6 @@
 MERC_ALL_C_INCL_DIRS=${MERCURY_ALL_C_INCL_DIRS=-I$MERC_C_INCL_DIR}
 LOCAL_C_INCL_DIR=${MERCURY_LOCAL_C_INCL_DIR=/usr/local/include}
 ALL_LOCAL_C_INCL_DIRS=${MERCURY_ALL_LOCAL_C_INCL_DIRS=-I$LOCAL_C_INCL_DIR}
-ALL_C_INCL_DIRS="$MERC_ALL_C_INCL_DIRS $ALL_LOCAL_C_INCL_DIRS"
 
 DEFAULT_GRADE=${MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@}
 CC=${MERCURY_C_COMPILER="@CC@"}
@@ -431,7 +430,7 @@
 esac
 
 
-ALL_CC_OPTS="$ALL_C_INCL_DIRS $ANSI_OPTS $CHECK_OPTS $OPT_OPTS \
+ALL_CC_OPTS="$MERC_ALL_C_INCL_DIRS $ANSI_OPTS $CHECK_OPTS $OPT_OPTS \
 		$GRADE_OPTS $GC_OPTS $DEFINE_OPTS \
 		$TRACE_OPTS $STACK_TRACE_OPTS $LLDEBUG_OPTS $C_DEBUG_OPTS \
 		$PROF_TIME_OPTS $PROF_CALLS_OPTS $PROF_MEMORY_OPTS \
@@ -439,9 +438,9 @@
 		$PICREG_OPTS $ARCH_OPTS $ARG_OPTS"
 
 case $verbose in true)
-	echo $CC $ALL_CC_OPTS "$@" $OVERRIDE_OPTS ;;
+	echo $CC $ALL_CC_OPTS "$@" $OVERRIDE_OPTS $ALL_LOCAL_C_INCL_DIRS;;
 esac
 case $# in
 	0) exec $CC $ALL_CC_OPTS $OVERRIDE_OPTS ;;
-	*) exec $CC $ALL_CC_OPTS "$@" $OVERRIDE_OPTS ;;
+	*) exec $CC $ALL_CC_OPTS "$@" $OVERRIDE_OPTS $ALL_LOCAL_C_INCL_DIRS;;
 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