[m-dev.] for review: Use default extensions

Peter Ross petdr at cs.mu.OZ.AU
Wed Jun 21 22:46:44 AEST 2000


Hi,


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


Estimated hours taken: 8

When generating the .dv and .dep files use autoconfed settings for
such things as: object and library file extensions, and how to create a
library.  Change the compiler Mmakefiles to handle files with the new
extensions.

compiler/modules.m:
    When generating the '.dv' and '.dep' files use '.$O' and '.$A'
    instead of '.o' and '.a'.  Use $EXT_FOR_EXE when generating the
    realclean target, as you need to pass the full file name to rm.
    Use $AR_LIBFILE_OPT when creating libraries.
    
scripts/Mmake.vars.in:
    Set the value EXT_FOR_EXE, which is the extension which must be
    placed on executables.

Mmakefile:
library/Mmakefile:
runtime/Mmakefile:
scripts/Mmake.rules:
tools/bootcheck:
trace/Mmakefile:
    Use '.$O' for '.o' and '.$A' for '.a'.

util/Mmakefile:
    You need to remove PROGFILENAMES not PROGS, as PROGFILENAMES
    includes the executable extension.

Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.55
diff -u -r1.55 Mmakefile
--- Mmakefile	2000/06/08 13:06:37	1.55
+++ Mmakefile	2000/06/21 12:27:01
@@ -336,19 +336,19 @@
 .PHONY: install_grades
 install_grades: scripts
 	cd boehm_gc && rm -rf tmp_dir && mkdir tmp_dir && \
-		{ mv -f *.o *.pic_o *.$A *.so tmp_dir || true; }
+		{ mv -f *.$O *.pic_o *.$A *.so tmp_dir || true; }
 	cd runtime && rm -rf tmp_dir && mkdir tmp_dir && \
-		{ mv -f *.o *.pic_o *.$A *.so tmp_dir || true; }
+		{ mv -f *.$O *.pic_o *.$A *.so tmp_dir || true; }
 	cd library && rm -rf tmp_dir && mkdir tmp_dir && \
-		{ mv -f *.dep *.h *.c *.o *.pic_o *.$A *.so \
+		{ mv -f *.dep *.h *.c *.$O *.pic_o *.$A *.so \
 			Mercury/deps/*.dep \
-			Mercury/cs/*.c Mercury/os/*.o tmp_dir || true; }
+			Mercury/cs/*.c Mercury/os/*.$O tmp_dir || true; }
 	cd browser && rm -rf tmp_dir && mkdir tmp_dir && \
-		{ mv -f *.dep *.h *.c *.o *.pic_o *.$A *.so \
+		{ mv -f *.dep *.h *.c *.$O *.pic_o *.$A *.so \
 			Mercury/deps/*.dep \
-			Mercury/cs/*.c Mercury/os/*.o tmp_dir || true; }
+			Mercury/cs/*.c Mercury/os/*.$O tmp_dir || true; }
 	cd trace && rm -rf tmp_dir && mkdir tmp_dir && \
-		{ mv -f *.o *.pic_o *.$A *.so tmp_dir || true; }
+		{ mv -f *.$O *.pic_o *.$A *.so tmp_dir || true; }
 	#
 	# Use the newly installed compiler to build the libraries
 	# in various different grades.  We need to override MC=mmc
@@ -380,13 +380,13 @@
 		  $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_library ) && \
 		( cd trace && \
 		  $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_lib ) && \
-		( cd boehm_gc && rm -f *.o *.pic_o *.$A *.so ) && \
-		( cd runtime && rm -f *.o *.pic_o *.$A *.so ) && \
-		( cd library && rm -f *.dep *.h *.c *.o *.pic_o *.$A *.so \
-				Mercury/cs/*.c Mercury/os/*.o ) && \
-		( cd browser && rm -f *.dep *.h *.c *.o *.pic_o *.$A *.so \
-				Mercury/cs/*.c Mercury/os/*.o ) && \
-		( cd trace && rm -f *.o *.pic_o *.$A *.so ) && \
+		( cd boehm_gc && rm -f *.$O *.pic_o *.$A *.so ) && \
+		( cd runtime && rm -f *.$O *.pic_o *.$A *.so ) && \
+		( cd library && rm -f *.dep *.h *.c *.$O *.pic_o *.$A *.so \
+				Mercury/cs/*.c Mercury/os/*.$O ) && \
+		( cd browser && rm -f *.dep *.h *.c *.$O *.pic_o *.$A *.so \
+				Mercury/cs/*.c Mercury/os/*.$O ) && \
+		( cd trace && rm -f *.$O *.pic_o *.$A *.so ) && \
 		true \
 		|| { scripts/mercury_cleanup_install; exit 1; }; \
 	    fi; \
@@ -394,11 +394,11 @@
 	cd boehm_gc && { mv tmp_dir/* . ; rmdir tmp_dir; true; }
 	cd runtime  && { mv tmp_dir/* . ; rmdir tmp_dir; true; }
 	cd library  && { [ -d Mercury/cs ] && mv tmp_dir/*.c Mercury/cs; \
-			 [ -d Mercury/os ] && mv tmp_dir/*.o Mercury/os; \
+			 [ -d Mercury/os ] && mv tmp_dir/*.$O Mercury/os; \
 			 [ -d Mercury/deps ] && mv tmp_dir/*.dep Mercury/deps;\
 			 mv tmp_dir/* . ; rmdir tmp_dir; true; }
 	cd browser  && { [ -d Mercury/cs ] && mv tmp_dir/*.c Mercury/cs; \
-			 [ -d Mercury/os ] && mv tmp_dir/*.o Mercury/os; \
+			 [ -d Mercury/os ] && mv tmp_dir/*.$O Mercury/os; \
 			 [ -d Mercury/deps ] && mv tmp_dir/*.dep Mercury/deps;\
 			 mv tmp_dir/* . ; rmdir tmp_dir; true; }
 	cd trace    && { mv tmp_dir/* . ; rmdir tmp_dir; true; }
@@ -415,17 +415,17 @@
 	cd library && \
 	rm -rf tmp_dir && \
 	mkdir tmp_dir && \
-	{ mv -f *.dir *.dep *.h *.c *.o *.pic_o *.$A *.so \
-		Mercury/cs/*.c Mercury/os/*.o tmp_dir || true; } && \
+	{ mv -f *.dir *.dep *.h *.c *.$O *.pic_o *.$A *.so \
+		Mercury/cs/*.c Mercury/os/*.$O tmp_dir || true; } && \
 	for grade in $(GRADE) $(LIBGRADES); do \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade depend && \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
 			{ scripts/mercury_cleanup_install; exit 1; }; \
-	        rm -rf *.dir *.dep *.h *.c *.o *.pic_o *.$A *.so \
-			Mercury/cs/*.c Mercury/os/*.o; \
+	        rm -rf *.dir *.dep *.h *.c *.$O *.pic_o *.$A *.so \
+			Mercury/cs/*.c Mercury/os/*.$O; \
 	done && \
 	{ [ -d Mercury/cs ] && mv tmp_dir/*.c Mercury/cs; \
-	  [ -d Mercury/os ] && mv tmp_dir/*.o Mercury/os; \
+	  [ -d Mercury/os ] && mv tmp_dir/*.$O Mercury/os; \
 	  [ -d Mercury/deps ] && mv tmp_dir/*.dep Mercury/deps; \
 	  mv tmp_dir/* . ; rmdir tmp_dir; true; }
 
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.129
diff -u -r1.129 modules.m
--- compiler/modules.m	2000/06/08 07:58:55	1.129
+++ compiler/modules.m	2000/06/21 12:27:34
@@ -71,7 +71,7 @@
 	%		FileName):
 	%	Like module_name_to_file_name, but also allows a prefix.
 	%
-	%	Used for creating library names, e.g. `lib<foo>.a'
+	%	Used for creating library names, e.g. `lib<foo>.$A'
 	%	and `lib<foo>.so'.
 	%
 :- pred module_name_to_lib_file_name(string, module_name, string, bool,
@@ -86,7 +86,7 @@
 	%	`module_name_to_file_name(Module, ".dir", DirName)'.
 	%	This predicate does not create that directory.
 	%
-	%	This predicate is used for the names of .c and .o files
+	%	This predicate is used for the names of .c and .$O files
 	%	for --split-c-files.
 	%
 :- pred module_name_to_split_c_file_name(module_name, int, string, file_name,
@@ -604,10 +604,10 @@
 		; Ext = ""
 		; Ext = ".split"
 		% library files
-		; Ext = ".a"
+		; Ext = ".$A"
 		; Ext = ".so"
 		; Ext = ".$(EXT_FOR_SHARED_LIB)"
-		; Ext = ".split.a"
+		; Ext = ".split.$A"
 		; Ext = ".split.so"
 		; Ext = ".split.$(EXT_FOR_SHARED_LIB)"
 		; Ext = ".init"
@@ -643,21 +643,21 @@
 		% we need to handle a few cases specially
 		%
 		{
-			Ext = ".dir/*.o"
+			Ext = ".dir/*.$O"
 		->
 			SubDirName = "dirs"
 		;
-			% .o and .pic_o files need to go in the
+			% .$O and .pic_o files need to go in the
 			% same directory, so that using
 			% .$(EXT_FOR_PIC_OBJECTS) will work.
-			( Ext = ".o"
+			( Ext = ".$O"
 			; Ext = ".pic_o"
 			; Ext = "$(EXT_FOR_PIC_OBJECTS)"
 			)
 		->
 			SubDirName = "os"
 		;
-			% _init.c, _init.s, _init.o etc. files
+			% _init.c, _init.s, _init.$O etc. files
 			% go in the cs, ss, os etc. subdirectories
 			string__append("_init.", ExtName, Ext)
 		->
@@ -1607,7 +1607,7 @@
 				io__write_strings(DepStream, [
 					"\n\n", MakeVarName,
 					".fact_tables.os = $(", MakeVarName,
-					".fact_tables:%=$(os_subdir)%.o)\n\n",
+					".fact_tables:%=$(os_subdir)%.$O)\n\n",
 					MakeVarName,
 					".fact_tables.cs = $(", MakeVarName,
 					".fact_tables:%=$(cs_subdir)%.c)\n\n"
@@ -1620,7 +1620,7 @@
 				io__write_strings(DepStream, ["\n\n", 
 					MakeVarName, ".fact_tables.os ="]),
 				write_fact_table_dependencies_list(ModuleName,
-					FactDeps, ".o", DepStream),
+					FactDeps, ".$O", DepStream),
 				io__nl(DepStream)
 			)
 		;
@@ -1638,11 +1638,11 @@
 		module_name_to_file_name(ModuleName, ".optdate", no,
 					OptDateFileName),
 		module_name_to_file_name(ModuleName, ".c", no, CFileName),
-		module_name_to_file_name(ModuleName, ".o", no, ObjFileName),
+		module_name_to_file_name(ModuleName, ".$O", no, ObjFileName),
 		module_name_to_file_name(ModuleName, ".rlo", no, RLOFileName),
 		module_name_to_file_name(ModuleName, ".pic_o", no,
 							PicObjFileName),
-		module_name_to_split_c_file_pattern(ModuleName, ".o",
+		module_name_to_split_c_file_pattern(ModuleName, ".$O",
 			SplitObjPattern),
 		io__write_strings(DepStream, ["\n\n",
 			OptDateFileName, " ",
@@ -1777,7 +1777,7 @@
 		write_dependencies_list(ShortDeps, ".int3", DepStream),
 			
 		module_name_to_file_name(ModuleName, ".dir", no, DirFileName),
-		module_name_to_split_c_file_name(ModuleName, 0, ".o",
+		module_name_to_split_c_file_name(ModuleName, 0, ".$O",
 			SplitCObj0FileName),
 		io__write_strings(DepStream, [
 			"\n\n",
@@ -2596,9 +2596,9 @@
 
 	io__write_string(DepStream, MakeVarName),
 	io__write_string(DepStream, ".os = "),
-	write_compact_dependencies_list(Modules, "$(os_subdir)", ".o",
+	write_compact_dependencies_list(Modules, "$(os_subdir)", ".$O",
 					Basis, DepStream),
-	write_extra_link_dependencies_list(ExtraLinkObjs, ".o", DepStream),
+	write_extra_link_dependencies_list(ExtraLinkObjs, ".$O", DepStream),
 	io__write_string(DepStream, "\n"),
 
 	io__write_string(DepStream, MakeVarName),
@@ -2622,7 +2622,7 @@
 
 	io__write_string(DepStream, MakeVarName),
 	io__write_string(DepStream, ".dir_os = "),
-	write_compact_dependencies_list(Modules, "$(dirs_subdir)", ".dir/*.o",
+	write_compact_dependencies_list(Modules, "$(dirs_subdir)", ".dir/*.$O",
 					Basis, DepStream),
 	io__write_string(DepStream, "\n"),
 
@@ -2765,7 +2765,7 @@
 	module_name_to_file_name(ModuleName, ".init", yes, InitFileName),
 	module_name_to_file_name(ModuleName, "_init.c", yes, InitCFileName),
 	module_name_to_file_name(ModuleName, "_init.s", no, InitAsmFileName),
-	module_name_to_file_name(ModuleName, "_init.o", yes, InitObjFileName),
+	module_name_to_file_name(ModuleName, "_init.$O", yes, InitObjFileName),
 	module_name_to_file_name(ModuleName, "_init.pic_o", yes,
 							InitPicObjFileName),
 
@@ -2789,10 +2789,10 @@
 
 	%
 	% We include $(foo.cs) first in the dependency list, before $(foo.os).
-	% This is not strictly necessary, since the .o files themselves depend
+	% This is not strictly necessary, since the .$O files themselves depend
 	% on the .c files, but we do it to ensure that Make will try to
 	% create all the C files first, thus detecting errors early,
-	% rather than first spending time compiling C files to .o,
+	% rather than first spending time compiling C files to .$O,
 	% which could be a waste of time if the program contains errors.
 	%
 	% But we can only do this if we don't remove the .c files,
@@ -2823,7 +2823,8 @@
 
 	module_name_to_file_name(SourceModuleName, ".split", yes,
 				SplitExeFileName),
-	module_name_to_file_name(ModuleName, ".split.a", yes, SplitLibFileName),
+	module_name_to_file_name(ModuleName, ".split.$A",
+			yes, SplitLibFileName),
 	io__write_strings(DepStream, [
 		SplitExeFileName, " : ", SplitLibFileName, " ",
 			InitObjFileName, " ", All_MLLibsDepString, "\n",
@@ -2835,8 +2836,9 @@
 	io__write_strings(DepStream, [
 		SplitLibFileName, " : $(", MakeVarName, ".dir_os) $(MLOBJS)\n",
 		"\trm -f ", SplitLibFileName, "\n",
-		"\t$(AR) $(ALL_ARFLAGS) ", SplitLibFileName, " $(MLOBJS)\n",
-		"\tfind $(", MakeVarName, ".dirs) -name ""*.o"" -print | \\\n",
+		"\t$(AR) $(ALL_ARFLAGS) $(AR_LIBFILE_OPT)",
+		SplitLibFileName, " $(MLOBJS)\n",
+		"\tfind $(", MakeVarName, ".dirs) -name ""*.$O"" -print | \\\n",
 		"\t	xargs $(AR) q ", SplitLibFileName, "\n",
 		"\t$(RANLIB) $(ALL_RANLIBFLAGS) ", SplitLibFileName, "\n\n"
 	]),
@@ -2856,7 +2858,8 @@
 		MaybeTransOptsVar = ""
 	},
 	module_name_to_lib_file_name("lib", ModuleName, "", no, LibTargetName),
-	module_name_to_lib_file_name("lib", ModuleName, ".a", yes, LibFileName),
+	module_name_to_lib_file_name("lib", ModuleName, ".$A",
+			yes, LibFileName),
 	module_name_to_lib_file_name("lib", ModuleName, ".so", yes,
 							SharedLibFileName),
 	module_name_to_lib_file_name("lib", ModuleName,
@@ -2886,7 +2889,7 @@
 		LibFileName, " : $(", MakeVarName, ".maybe_cs) ",
 			"$(", MakeVarName, ".os) $(MLOBJS)\n",
 		"\trm -f ", LibFileName, "\n",
-		"\t$(AR) $(ALL_ARFLAGS) ", LibFileName, " ",
+		"\t$(AR) $(ALL_ARFLAGS) $(AR_LIBFILE_OPT)", LibFileName, " ",
 			"$(", MakeVarName, ".os) $(MLOBJS)\n",
 		"\t$(RANLIB) $(ALL_RANLIBFLAGS) ", LibFileName, "\n\n"
 	]),
@@ -3055,7 +3058,7 @@
 	]),
 	io__write_strings(DepStream, [
 		"\t-rm -f ",
-			ExeFileName, " ",
+			ExeFileName, "$(EXT_FOR_EXE) ",
 			SplitExeFileName, " ",
 			SplitLibFileName, " ",
 			InitFileName, " ",
@@ -3094,7 +3097,7 @@
 
 %-----------------------------------------------------------------------------%
 	% get_extra_link_objects(Modules, DepsMap, ExtraLinkObjs) },
-	% Find any extra .o files that should be linked into the executable.
+	% Find any extra .$O files that should be linked into the executable.
 	% Currently only looks for fact table object files.
 :- pred get_extra_link_objects(list(module_name), deps_map,
 		assoc_list(file_name, module_name)).
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.51
diff -u -r1.51 Mmakefile
--- library/Mmakefile	2000/06/08 13:06:45	1.51
+++ library/Mmakefile	2000/06/21 12:27:42
@@ -24,7 +24,7 @@
 
 #-----------------------------------------------------------------------------#
 
-# If we're going to generate both `.o' files and `.pic_o' files, then
+# If we're going to generate both `.$O' files and `.pic_o' files, then
 # don't remove the intermediate `.c' files.
 RM_C	=	$(LIBRARY_RM_C)
 
@@ -188,8 +188,8 @@
 
 .PHONY: lib_std
 # the following dependency is just there to improve compilation speed;
-# making tree234.o first improves effective parallelism with parallel makes.
-lib_std: $(os_subdir)tree234.o
+# making tree234.$O first improves effective parallelism with parallel makes.
+lib_std: $(os_subdir)tree234.$O
 lib_std: lib$(STD_LIB_NAME).$A lib$(STD_LIB_NAME).$(EXT_FOR_SHARED_LIB)
 lib_std: $(STD_LIB_NAME).init
 
@@ -218,7 +218,7 @@
 #-----------------------------------------------------------------------------#
 
 # Ensure we recompile library__version if VERSION is changed.
-$(os_subdir)library.o \
+$(os_subdir)library.$O \
 $(os_subdir)library.pic_o \
 	: $(RUNTIME_DIR)/mercury_conf.h
 
@@ -227,9 +227,9 @@
 # a global make clean. Here we list only the header files from the runtime
 # whose changes don't usually require a make clean but which nevertheless
 # require some files in the library to be recompiled.
-$(os_subdir)benchmarking.o \
+$(os_subdir)benchmarking.$O \
 $(os_subdir)benchmarking.pic_o \
-$(os_subdir)std_util.o \
+$(os_subdir)std_util.$O \
 $(os_subdir)std_util.pic_o \
 	: ../runtime/mercury_stack_layout.h
 
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.57
diff -u -r1.57 Mmakefile
--- runtime/Mmakefile	2000/06/08 13:06:46	1.57
+++ runtime/Mmakefile	2000/06/21 12:27:44
@@ -146,7 +146,7 @@
 			mercury_type_info.c	\
 			mercury_wrapper.c
 
-OBJS		= $(CFILES:.c=.o)
+OBJS		= $(CFILES:.c=.$O)
 PIC_OBJS	= $(CFILES:.c=.$(EXT_FOR_PIC_OBJECTS))
 
 LDFLAGS		= -L$(BOEHM_GC_DIR)
@@ -163,7 +163,7 @@
 		`
 
 HDR_CHECK_CS = $(HDRS:.h=_check.c)
-HDR_CHECK_OBJS = $(HDRS:.h=_check.o)
+HDR_CHECK_OBJS = $(HDRS:.h=_check.$O)
 HDR_CHECK_NMS = $(HDRS:.h=_check.nms)
 HDR_CHECK_MACROS = $(HDRS:.h=_check.macros)
 
@@ -237,7 +237,7 @@
 
 #
 # $(HDR_CHECK_OBJS) is used to check that the header files are self-contained.
-# The rule for foo_check.o checks that the header file foo.h is properly
+# The rule for foo_check.$O checks that the header file foo.h is properly
 # self-contained, i.e. that the header file foo.h includes any other
 # header files that define types used by foo.h.
 # It does this by compiling a foo_check.c file that contains only a single
@@ -249,7 +249,7 @@
 
 # The mercury_deep_copy_body.h header is not meant to be self-contained.
 # So the following rule is used to suppress that check for this header.
-mercury_deep_copy_body_check.o:
+mercury_deep_copy_body_check.$O:
 	@true
 	
 #
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.82
diff -u -r1.82 Mmake.rules
--- scripts/Mmake.rules	2000/06/08 07:59:10	1.82
+++ scripts/Mmake.rules	2000/06/21 12:27:51
@@ -18,7 +18,7 @@
 		.int0 .int .int2 .int3 .opt .trans_opt \
 		.dep .depend .dv .doit .ugly \
 		.date0 .date .date3 .optdate .trans_opt_date \
-		.c .nu .o .pic_o \
+		.c .nu .$O .pic_o \
 		.i .s .pic_s \
 		.ql .pl \
 		.rlo
@@ -176,14 +176,14 @@
 	$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) --aditi-only $< > $*.err 2>&1
 
 # If we are removing the .c files, we need to tell Make that we're
-# generating the .o files directly from the .m files, but
+# generating the .$O files directly from the .m files, but
 # in order to avoid remaking the .c files if they're already there,
 # we need to invoke mmake recursively for each .c file.
 # This can be pretty inefficient.
 
 ifneq ($(RM_C),:)
 
-$(os_subdir)%.o : %.m
+$(os_subdir)%.$O : %.m
 	$(MMAKE_MAKE_CMD) $(MFLAGS) MC="$(MC)" ALL_MCFLAGS="$(ALL_MCFLAGS)" \
 		ALL_GRADEFLAGS="$(ALL_GRADEFLAGS)" $(cs_subdir)$*.c
 	$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $(cs_subdir)$*.c \
@@ -198,12 +198,12 @@
 
 endif # RM_C != :
 
-# For --split-c-files, we generate the .o files directly from the .m files.
+# For --split-c-files, we generate the .$O files directly from the .m files.
 # (One reason for this is that there's no easy of telling Make how many
-# `.o' files it should make, since the number of them depends on what's
+# `.$O' files it should make, since the number of them depends on what's
 # in the source files.)
 
-$(dirs_subdir)%.dir/*.o: %.m
+$(dirs_subdir)%.dir/*.$O: %.m
 	rm -f $@
 	$(MCS) $(ALL_GRADEFLAGS) $(ALL_MCSFLAGS) $<
 
@@ -225,7 +225,7 @@
 # Rules for compiling C files in the user's source directory.
 #
 
-.c.o:
+.c.$O:
 	$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< $(OBJFILE_OPT)$@
 
 .c.pic_o:
@@ -252,8 +252,8 @@
 
 ifneq ("$(cs_subdir)","")
 
-$(os_subdir)%.o : $(cs_subdir)%.c
-	$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< -o $@
+$(os_subdir)%.$O : $(cs_subdir)%.c
+	$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< $(OBJFILE_OPT)$@
 
 $(os_subdir)%.pic_o : $(cs_subdir)%.c
 	$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
@@ -373,7 +373,7 @@
 		fi; \
 	done && \
 	{ mv tmp_dir/*.c $(cs_subdir). ; \
-	  mv tmp_dir/*.o $(os_subdir). ; \
+	  mv tmp_dir/*.$O $(os_subdir). ; \
 	  mv tmp_dir/*.pic_o $(os_subdir). ; \
 	  mv tmp_dir/*.dep $(deps_subdir). ; \
 	  mv tmp_dir/* . ; rmdir tmp_dir ; true; }
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.35
diff -u -r1.35 Mmake.vars.in
--- scripts/Mmake.vars.in	2000/06/16 00:21:39	1.35
+++ scripts/Mmake.vars.in	2000/06/21 12:27:53
@@ -481,6 +481,7 @@
 empty_string=
 OBJFILE_OPT=@OBJFILE_OPT@$(empty_string)
 
+EXT_FOR_EXE=@EXE_SUFFIX@
 O=@OBJ_SUFFIX@
 A=@LIB_SUFFIX@
 
Index: trace/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/Mmakefile,v
retrieving revision 1.15
diff -u -r1.15 Mmakefile
--- trace/Mmakefile	2000/06/08 13:06:49	1.15
+++ trace/Mmakefile	2000/06/21 12:27:59
@@ -72,7 +72,7 @@
 RUNTIME_HDRS	=	\
 			../runtime/mercury_stack_layout.h
 
-OBJS		= $(CFILES:.c=.o)
+OBJS		= $(CFILES:.c=.$O)
 PIC_OBJS	= $(CFILES:.c=.$(EXT_FOR_PIC_OBJECTS))
 
 LDFLAGS		= -L$(BROWSER_DIR) -L$(LIBRARY_DIR) \
Index: util/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/util/Mmakefile,v
retrieving revision 1.8
diff -u -r1.8 Mmakefile
--- util/Mmakefile	2000/06/08 07:59:13	1.8
+++ util/Mmakefile	2000/06/21 12:27:59
@@ -47,6 +47,6 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	-rm -f $(PROGS)
+	-rm -f $(PROGFILENAMES)
 
 #-----------------------------------------------------------------------------#

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list