[m-rev.] for review: fix mmc --make grade install

Peter Wang wangp at students.csse.unimelb.edu.au
Mon Jan 8 16:45:42 AEDT 2007


Estimated hours taken: 1
Branches: main

browser/Mmakefile:
mdbcomp/Mmakefile:
	Fix problem installing grade libraries with `mmake --use-mmc-make'.
	`mmc --make' only makes `.init' files as a side-effect of building
	libraries so move library dependencies before init file dependencies
	in install targets.  Also we need to use lib<name> targets instead of
	separate lib<name>.$A and lib<name>.$(EXT_FOR_SHARED_LIB) targets.

	Don't install mer_mdbcomp.init to non-grade specific directory.
 
PS. mer_std.init is still installed to a non-grade specific directory.
I think the entire install_init rule in library/Mmakefile can be removed.


Index: browser/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/Mmakefile,v
retrieving revision 1.50
diff -u -r1.50 Mmakefile
--- browser/Mmakefile	4 Dec 2006 01:33:28 -0000	1.50
+++ browser/Mmakefile	8 Jan 2007 03:40:09 -0000
@@ -293,9 +293,8 @@
 	cp `vpath_find $(BROWSER_LIB_NAME).init` $(INSTALL_GRADE_MODULE_DIR)
 
 .PHONY: install_library
-install_library: install_init \
-		lib$(BROWSER_LIB_NAME).$A \
-		lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
+install_library: lib$(BROWSER_LIB_NAME) \
+		install_init \
 		install_dirs
 	cp `vpath_find lib$(BROWSER_LIB_NAME).$A \
 		lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB)` \
Index: mdbcomp/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/Mmakefile,v
retrieving revision 1.10
diff -u -r1.10 Mmakefile
--- mdbcomp/Mmakefile	23 Nov 2006 04:08:55 -0000	1.10
+++ mdbcomp/Mmakefile	8 Jan 2007 03:42:45 -0000
@@ -233,7 +233,6 @@
 .PHONY: install
 install: install_library
 
-# XXX Trace goal fix
 .PHONY: install_dirs
 install_dirs:
 	[ -d $(INSTALL_MODULE_DIR) ] || mkdir -p $(INSTALL_MODULE_DIR)
@@ -253,16 +252,13 @@
 
 else 
 
-# XXX Trace goal fix.
 .PHONY: install_init
 install_init: $(MDBCOMP_LIB_NAME).init install_dirs
-	cp `vpath_find $(MDBCOMP_LIB_NAME).init` $(INSTALL_MODULE_DIR)
 	cp `vpath_find $(MDBCOMP_LIB_NAME).init` $(INSTALL_GRADE_MODULE_DIR)
 
 .PHONY: install_library
-install_library: install_init \
-		lib$(MDBCOMP_LIB_NAME).$A \
-		lib$(MDBCOMP_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
+install_library: lib$(MDBCOMP_LIB_NAME) \
+		install_init \
 		all-ints install_dirs
 	cp `vpath_find lib$(MDBCOMP_LIB_NAME).$A \
 		lib$(MDBCOMP_LIB_NAME).$(EXT_FOR_SHARED_LIB)` \
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list