[m-rev.] for review: use ERR_REDIRECT for nested modules

Peter Ross pro at missioncriticalit.com
Thu Dec 5 22:37:10 AEDT 2002


Hi,

For stayl to review.

I think this change should also go onto the release branch, as it is a very
user visible wart in the behaviour of the ERR_REDIRECT variable.  Objections?

===================================================================


Estimated hours taken: 0.5
Branches: main

compiler/modules.m:
	When generating the rules for nested modules use ERR_REDIRECT
	rather than hard-coding how we handle the output.


Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.254
diff -u -r1.254 modules.m
--- compiler/modules.m	29 Nov 2002 12:01:12 -0000	1.254
+++ compiler/modules.m	5 Dec 2002 11:34:26 -0000
@@ -2744,33 +2744,31 @@
 					"$(ALL_MCTOIFLAGS) ", ModuleArg, "\n",
 				CDateFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
-					ModuleArg, " > ", ErrFileName,
-					" 2>&1\n",
+					ModuleArg, " $(ERR_REDIRECT)\n",
 				"ifeq ($(TARGET_ASM),yes)\n",
 				AsmDateFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
 					"--target-code-only ", ModuleArg,
-					" > ", ErrFileName, " 2>&1\n",
+					" $(ERR_REDIRECT)\n",
 				PicAsmDateFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
 					"--target-code-only --pic ",
 					"\\\n",
 				"\t\t--cflags ""$(GCCFLAGS_FOR_PIC)"" ",
-					ModuleArg, " > ", ErrFileName,
-					" 2>&1\n",
+					ModuleArg, " $(ERR_REDIRECT)\n",
 				"endif # TARGET_ASM\n",
 				ILDateFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
-					"--il-only ", ModuleArg, " > ",
-					ErrFileName, " 2>&1\n",
+					"--il-only ", ModuleArg,
+					" $(ERR_REDIRECT)\n",
 				JavaDateFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
-					"--java-only ", ModuleArg, " > ",
-					ErrFileName, " 2>&1\n",
+					"--java-only ", ModuleArg,
+					" $(ERR_REDIRECT)\n",
 				RLOFileName, " : ", SourceFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
-					"--aditi-only ", ModuleArg, " > ",
-					ErrFileName, " 2>&1\n"
+					"--aditi-only ", ModuleArg,
+					" $(ERR_REDIRECT)\n"
 			])
 		;
 			[]

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