[m-rev.] diff: fix MCFLAGS-<module> bug

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 26 01:12:18 AEST 2002


On 26-Jun-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 1.5
> Branches: main
> 
> My change to fix the handling of target specific MCFLAGS
> variables didn't work with `--split-c-files'.
> 
> compiler/modules.m:
> 	Fix some bugs in the handling of `--split-c-files':
> 	
> 	- Make `--split-c-files' work where the module name doesn't
> 	  match the file name.
> 
> 	- $(MCFLAGS-module) wasn't being passed to mmc when `module.dir/*.o'
> 	  were being rebuilt (it was being passed when the files were
> 	  being built from scratch).
> 
> scripts/Mmake.rules:
> 	The pattern rule for `%.dir/*.o' is now redundant, so remove it.


Estimated hours taken: 0.25
Branches: main

tests/hard_coded/Mmakefile:
tests/hard_coded/mapped_module.split.exp:
tests/hard_coded/split_c_files.exp:
	Check that `--split-c-files' works where the module
	name doesn't match the file name.

Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.155
diff -u -u -r1.155 Mmakefile
--- Mmakefile	11 Jun 2002 16:29:57 -0000	1.155
+++ Mmakefile	25 Jun 2002 14:37:10 -0000
@@ -123,6 +123,7 @@
 	shift_test \
 	solve_quadratic \
 	space \
+	split_c_files \
 	string_alignment \
 	string_alignment_bug \
 	string_loop \
@@ -229,8 +230,9 @@
 # --split-c-files does not work in the hl* grades (e.g. hlc.gc),
 # because it hasn't yet been implemented yet.
 # The same is true for deep profiling grades.
+# The modules in SPLIT_PROGS should also be in ORDINARY_PROGS above.
 ifeq "$(findstring hl,$(GRADE))$(findstring profdeep,$(GRADE))" ""
-	SPLIT_PROGS = split_c_files
+	SPLIT_PROGS = mapped_module split_c_files
 else
 	SPLIT_PROGS =
 endif
@@ -317,8 +319,8 @@
 
 #-----------------------------------------------------------------------------#
 
-DEPS=	$(PROGS:%=%.dep) $(SPLIT_PROGS:%=%.dep)
-DEPENDS=$(PROGS:%=%.depend) $(SPLIT_PROGS:%=%.depend)
+DEPS=	$(PROGS:%=%.dep)
+DEPENDS=$(PROGS:%=%.depend)
 OUTS=	$(PROGS:%=%.out) $(SPLIT_PROGS:%=%.split.out)
 RESS=	$(PROGS:%=%.res) $(SPLIT_PROGS:%=%.split.res)
 
Index: mapped_module.split.exp
===================================================================
RCS file: mapped_module.split.exp
diff -N mapped_module.split.exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mapped_module.split.exp	25 Jun 2002 14:45:27 -0000
@@ -0,0 +1 @@
+OK
Index: split_c_files.exp
===================================================================
RCS file: split_c_files.exp
diff -N split_c_files.exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ split_c_files.exp	25 Jun 2002 14:45:47 -0000
@@ -0,0 +1 @@
+[1, 2, 3]
--------------------------------------------------------------------------
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