[m-rev.] diff: fix `--c-include-directory' order bug

Simon Taylor stayl at cs.mu.OZ.AU
Mon Jul 15 17:04:11 AEST 2002



Estimated hours taken: 0.1
Branches: main

scripts/Mmake.vars.in:
compiler/handle_options.m:
	Fix a bug -- the grade-specific `inc' directory
	for an installed library must be searched first.
	`.mih' files are installed into the non-grade-specific
	directory to avoid adding an extra entry in VPATH,
	but those files won't necessarily be the right ones
	for the current grade.

Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.142
diff -u -u -r1.142 handle_options.m
--- compiler/handle_options.m	1 Jul 2002 09:03:54 -0000	1.142
+++ compiler/handle_options.m	15 Jul 2002 06:40:32 -0000
@@ -925,7 +925,7 @@
 		globals__io_lookup_accumulating_option(c_include_directory,
 			CIncludeDirs),
 		globals__io_set_option(c_include_directory,
-			accumulating(CIncludeDirs ++ ExtraCIncludeDirs))
+			accumulating(ExtraCIncludeDirs ++ CIncludeDirs))
 	;
 		{ MercuryLibDirs = [] }
 	),
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.74
diff -u -u -r1.74 Mmake.vars.in
--- scripts/Mmake.vars.in	24 Jun 2002 16:15:22 -0000	1.74
+++ scripts/Mmake.vars.in	15 Jul 2002 06:36:28 -0000
@@ -22,8 +22,9 @@
 EXTRA_C_LIB_DIRS	= \
 	$(patsubst %,%/lib/$(GRADESTRING)/@FULLARCH@,$(EXTRA_LIB_DIRS)) \
 	$(patsubst %,%/lib/@FULLARCH@,$(EXTRA_LIB_DIRS))
-EXTRA_C_INCL_DIRS	= $(patsubst %,%/inc,$(EXTRA_LIB_DIRS)) \
-	$(patsubst %,%/lib/$(GRADESTRING)/@FULLARCH@/inc,$(EXTRA_LIB_DIRS))
+EXTRA_C_INCL_DIRS	= \
+	$(patsubst %,%/lib/$(GRADESTRING)/@FULLARCH@/inc,$(EXTRA_LIB_DIRS)) \
+	$(patsubst %,%/inc,$(EXTRA_LIB_DIRS))
 EXTRA_INIT_DIRS		= $(patsubst %,%/modules,$(EXTRA_LIB_DIRS))
 MERCURY_EXTRA_INIT_DIRS = $(EXTRA_INIT_DIRS)
 else
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list