[m-dev.] diff: fix `mmake install' for MLDS grades

Fergus Henderson fjh at cs.mu.OZ.AU
Thu May 18 08:32:00 AEST 2000


On 17-May-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 
> Change the Mmake rules for `mmake install' so that they install the
> compiler-generated header files for MLDS grades.

Estimated hours taken: 0.5

Fix a couple of bugs in my recent change to fix the Mmake rules
for `make install' for the MLDS back-end.

compiler/modules.m:
	Fix a bug that broke the non-MLDS installs:
	when we're generating the `.dep' file for a non-MLDS grade,
	make sure that the `install_hdrs' target has no dependencies.

Mmakefile:
	Fix a bug that broke `mmake install_split_library':
	in the rule for `install_split_library', make sure to
	run `mmake depend' in the library directory before
	running `mmake install_split_library' there.

Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.125
diff -u -d -r1.125 modules.m
--- compiler/modules.m	2000/05/17 12:34:02	1.125
+++ compiler/modules.m	2000/05/17 22:15:51
@@ -2943,11 +2943,6 @@
 
 	module_name_to_lib_file_name("lib", ModuleName, ".install_hdrs", no,
 				LibInstallHdrsTargetName),
-	io__write_strings(DepStream, [
-		".PHONY : ", LibInstallHdrsTargetName, "\n",
-		LibInstallHdrsTargetName, " : $(", MakeVarName, ".hs) ",
-			"install_lib_dirs\n"
-	]),
 	globals__io_lookup_bool_option(highlevel_code, HighLevelCode),
 	( { HighLevelCode = yes } ->
 		%
@@ -2960,6 +2955,10 @@
 		% the `inc' directory, but doing that properly is non-trivial.)
 		%
 		io__write_strings(DepStream, [
+			".PHONY : ", LibInstallHdrsTargetName, "\n",
+			LibInstallHdrsTargetName, " : ",
+				"$(", MakeVarName, ".hs) ",
+				"install_lib_dirs\n",
 			"\tfor hdr in $(", MakeVarName, ".hs); do \\\n",
 			"\t	$(INSTALL) $$hdr $(INSTALL_INC_DIR)\\\n",
 			"\t	$(INSTALL) $$hdr $(INSTALL_INT_DIR)\\\n",
@@ -2969,6 +2968,8 @@
 		% for non-MLDS grades, we don't need to install the header
 		% files, so this rule does nothing
 		io__write_strings(DepStream, [
+			".PHONY : ", LibInstallHdrsTargetName, "\n",
+			LibInstallHdrsTargetName, " :\n",
 			"\t\n\n"
 		])
 	),
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.49
diff -u -d -r1.49 Mmakefile
--- Mmakefile	2000/05/17 12:07:16	1.49
+++ Mmakefile	2000/05/17 22:12:38
@@ -402,6 +402,7 @@
 	{ 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) GRADE=$$grade depend && \
 	        $(SUBDIR_MMAKE) GRADE=$$grade install_split_library || \
 			{ scripts/mercury_cleanup_install; exit 1; }; \
 	        rm -rf *.dir *.dep *.h *.c *.o *.pic_o *.a *.so \

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