[m-rev.] for review: support IL grades in mercury/*/Mmakefile better

Tyson Dowd trd at cs.mu.OZ.AU
Tue Mar 13 16:56:12 AEDT 2001


Hi,

I am still working on the support in the library for building il grades
out of the box, but this change handles the rest of the directories.

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


Estimated hours taken: 1
Branches: main release

boehm_gc/Mmakefile:
browser/Mmakefile:
trace/Mmakefile:
	Modify Mmakefiles so that we don't try to build unnecessary
	subsystems in IL grades.

runtime/Mmakefile:
	Add some support for installing the MCPP_HDRS and the DLLs in IL
	grades (largely untested).
	Fix some missing dependencies on the 'install_dirs' target.

scripts/Mmake.rules:
	Remove the check for ils_subdir, as this appears to be a
	cut-and-paste error -- the rules it surrounds are not for doing
	subdir builds.


Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.16
diff -u -r1.16 Mmakefile
--- boehm_gc/Mmakefile	2001/02/12 04:28:12	1.16
+++ boehm_gc/Mmakefile	2001/03/13 05:45:00
@@ -88,11 +88,27 @@
 	-[ -d $(INSTALL_MERC_GC_LIB_DIR) ] || \
 		mkdir -p $(INSTALL_MERC_GC_LIB_DIR)
 
+ifneq (,$(findstring il,$(GRADE)))
+
+# no need to build a garbage collector for the .NET backend.
+
 .PHONY: install_headers
+install_headers:
+
+.PHONY: install_lib
+install_lib:
+
+.PHONY: install_dll
+install_dll:
+
+else
+
+.PHONY: install_headers
 install_headers: install_dirs
 	cp $(HEADERS) $(INSTALL_INC_DIR)
 	cp $(PRIVATE_HEADERS) $(INSTALL_INC_DIR)/private
 
+
 .PHONY: install_lib
 install_lib: lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB) install_dirs
 	cp `vpath_find lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB)` \
@@ -101,5 +117,8 @@
 .PHONY: install_dll
 install_dll:
 	-[ -f libpar_gc.dll ] && cp `vpath_find libpar_gc.dll` $(INSTALL_BINDIR)
+
+endif
+
 
 #-----------------------------------------------------------------------------#
Index: browser/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/Mmakefile,v
retrieving revision 1.14
diff -u -r1.14 Mmakefile
--- browser/Mmakefile	2001/02/07 14:37:32	1.14
+++ browser/Mmakefile	2001/03/13 05:45:00
@@ -179,13 +179,30 @@
 	[ -d $(INSTALL_MODULE_DIR) ] || mkdir -p $(INSTALL_MODULE_DIR)
 	[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
 
+ifneq (,$(findstring il,$(GRADE)))
+
+# there is no browser in the .NET backend
+
 .PHONY: install_init
+install_init: 
+
+.PHONY: install_library
+install_library:
+
+else 
+
+.PHONY: install_init
 install_init: $(BROWSER_LIB_NAME).init install_dirs
 	cp `vpath_find $(BROWSER_LIB_NAME).init` $(INSTALL_MODULE_DIR)
 
+
 .PHONY: install_library
 install_library: lib$(BROWSER_LIB_NAME).$A \
 		lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB) install_dirs
 	cp `vpath_find lib$(BROWSER_LIB_NAME).$A \
 		lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB)` \
 		$(INSTALL_MERC_LIB_DIR)
+
+endif
+
+
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.69
diff -u -r1.69 Mmakefile
--- runtime/Mmakefile	2001/02/13 08:28:25	1.69
+++ runtime/Mmakefile	2001/03/13 05:45:01
@@ -219,8 +219,11 @@
 # assembly of their own.  We put the runtime and library dlls into a single
 # assembly called `mercury'
 MS_CL_NOASM=:noAssembly
+
+# We need to build the following DLLs for the .NET runtime
+DOTNET_DLLS=mercury_il.dll mercury_mcpp.dll
  
-runtime: mercury_il.dll mercury_mcpp.dll
+runtime: $(DOTNET_DLLS)
 
 mercury_mcpp.dll: mercury_il.dll
  
@@ -301,11 +304,24 @@
 	-[ -d $(INSTALL_MODULE_DIR) ] || mkdir -p $(INSTALL_MODULE_DIR)
 	-[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
 
+ifneq (,$(findstring il,$(GRADE)))
+
+.PHONY: install_headers 
+install_headers: $(MCPP_HDRS) install_dirs
+	cp `vpath_find $(MCPP_HDRS)` $(INSTALL_INC_DIR)
+
+.PHONY: install_init
+install_init: 
+
+.PHONY: install_lib 
+install_lib: $(DOTNET_DLLS) install_dirs
+	cp `vpath_find $(DOTNET_DLLS)` $(INSTALL_MERC_LIB_DIR)
+
+else
+
 .PHONY: install_headers
-install_headers: $(HDRS) $(BODY_HDRS) $(MACHHDRS) $(LIB_GLOBALS_H) \
-		$(MCPP_HDRS) install_dirs
+install_headers: $(HDRS) $(BODY_HDRS) $(MACHHDRS) $(LIB_GLOBALS_H) install_dirs
 	cp `vpath_find $(HDRS) $(BODY_HDRS) $(LIB_GLOBALS_H)` $(INSTALL_INC_DIR)
-	cp `vpath_find $(MCPP_HDRS)` $(INSTALL_INC_DIR)
 	-chmod u+w $(INSTALL_INC_DIR)/mercury_conf.h
 	cp `vpath_find $(MACHHDRS)` $(INSTALL_INC_DIR)/machdeps
 
@@ -317,12 +333,15 @@
 	# then delete it; otherwise the initialization would get done twice.
 	rm -f $(INSTALL_MODULE_DIR)/runtime.init
 
-.PHONY: install_lib
+.PHONY: install_lib install_dirs
 install_lib: lib$(RT_LIB_NAME).$A lib$(RT_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
 		install_dirs
 	cp `vpath_find lib$(RT_LIB_NAME).$A \
 		lib$(RT_LIB_NAME).$(EXT_FOR_SHARED_LIB)` \
 		$(INSTALL_MERC_LIB_DIR)
+
+endif
+
 
 #-----------------------------------------------------------------------------#
 
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.91
diff -u -r1.91 Mmake.rules
--- scripts/Mmake.rules	2001/03/11 16:52:45	1.91
+++ scripts/Mmake.rules	2001/03/13 05:52:42
@@ -334,7 +334,6 @@
 #
 
 ifneq (,$(findstring il,$(GRADE)))
-ifneq ("$(ils_subdir)","")
 
 .il.dll:
 	$(MS_ILASM) $(ALL_MS_ILASMFLAGS) /dll /quiet /OUT=$@ $<
@@ -349,7 +348,6 @@
 .cpp.exe:
 	$(MS_CL) -com+($MS_CL_NOASM) -I$(MERCURY_LIBRARY_PATH) $< -link -entry:main $(MS_CL_LIBS) -out:$@
 
-endif # $(ils_subdir) != ""
 endif # $(findstring il,$(GRADE)) != ""
 
 #-----------------------------------------------------------------------------#
Index: trace/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/Mmakefile,v
retrieving revision 1.20
diff -u -r1.20 Mmakefile
--- trace/Mmakefile	2001/02/13 08:28:27	1.20
+++ trace/Mmakefile	2001/03/13 05:45:01
@@ -183,6 +183,18 @@
 .PHONY: install
 install: install_headers install_lib
 
+ifneq (,$(findstring il,$(GRADE)))
+
+# there is no tracing in the .NET backend
+
+.PHONY: install_headers
+install_headers:
+
+.PHONY: install_lib
+install_lib:
+
+else
+
 .PHONY: install_headers
 install_headers: $(HDRS) $(LIB_GLOBALS_H)
 	cp `vpath_find $(HDRS) $(LIB_GLOBALS_H)` $(INSTALL_INC_DIR)
@@ -193,6 +205,8 @@
 	cp `vpath_find lib$(TRACE_LIB_NAME).$A \
 		lib$(TRACE_LIB_NAME).$(EXT_FOR_SHARED_LIB)` \
 		$(INSTALL_MERC_LIB_DIR)
+
+endif
 
 #-----------------------------------------------------------------------------#
 


-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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