[m-rev.] diff: improve runtime DLL copying.

Tyson Dowd trd at miscrit.be
Wed Aug 15 00:30:29 AEST 2001


Hi,


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


Estimated hours taken: 0.5
Branches: main

library/Mmakefile:
	Improve the handling of copying the DLLs from the library, we
	now add proper dependencies so that we don't end up with
	out-of-date DLLs while building the library.


Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.78
diff -u -r1.78 Mmakefile
--- library/Mmakefile	2001/08/14 10:18:45	1.78
+++ library/Mmakefile	2001/08/14 14:09:59
@@ -208,10 +208,8 @@
 
 lib_std: mercury.dll
 
-# Instead of generating UNIX style libraries, we general a bunch of
-# DLLs.  We have to hardcode the names of the C code files and the
-# runtime files.
-RUNTIME_DLLS=../runtime/mercury_mcpp.dll ../runtime/mercury_il.dll
+# We have to hardcode the names of the runtime DLL files.
+RUNTIME_DLLS=mercury_mcpp.dll mercury_il.dll
 
 # Turn this on if you wish to enable .NET debugging.
 DEBUG_MS_ILASMFLAGS=
@@ -233,10 +231,20 @@
 library_strong_name.sn:
 	sn -k library_strong_name.sn
 
-mercury.dll: $(library.dlls) $(library.foreign_dlls) library_strong_name.sn
-	cp $(RUNTIME_DLLS) .
+mercury.dll: copy_runtime_dlls $(library.dlls) $(library.foreign_dlls) library_strong_name.sn
 	$(MS_AL) -v:0.0.0.0 -keyf:library_strong_name.sn -out:mercury.dll \
 		$(library.dlls) $(library.foreign_dlls) $(RUNTIME_DLLS) 
+
+# The runtime DLLs must be copied into this directory from the runtime
+# directory so they can be installed properly.
+.PHONY: copy_runtime_dlls
+copy_runtime_dlls: $(RUNTIME_DLLS)
+
+mercury_il.dll: ../runtime/mercury_il.dll
+	cp ../runtime/mercury_il.dll .
+
+mercury_mcpp.dll: ../runtime/mercury_mcpp.dll
+	cp ../runtime/mercury_mcpp.dll .
 
 else
 

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