[m-rev.] for review: build boehmgc with MSVC

Peter Ross pro at missioncriticalit.com
Wed Oct 23 00:54:13 AEST 2002


On Wed, Oct 23, 2002 at 12:22:23AM +1000, Fergus Henderson wrote:
> Normally, autoconf variables needs to be mentioned in bindist/build_vars.in
> or bindist/bindist.configure.in.  In this particular case, it doesn't,
> since USING_MICROSOFT_CL_COMPILER is currently only used during the build,
> not after installation.  But this is somewhat fragile... someone might
> add a new use of USING_MICROSOFT_CL_COMPILER in scripts/Mmake.vars and
> wonder why the binary distribution broke.  So it may be worth
> documenting near the definition of USING_MICROSOFT_CL_COMPILER
> that it must only be used during the build, not by anything which
> will get installed, unless those files are updated.
> 
I have updated these files as well, just as quick as adding a comment and less
likely to lead to problems.

Here is the new log message plus interdiff.


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


Estimated hours taken: 2.5
Branches: main

Compile the boehmgc collector with the correct makefile when using the
MS Visual C compiler.  This fixes the problem introduced by fjh's
previous change to make merging to a new boehmgc collector easier.
<overview or general description of changes>

configure.in:
Mmake.common.in:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
	Set the USING_MICROSOFT_CL_COMPILER variable when we are using
	the MS compiler.
	Delete BOEHMGC_MAKEFILE as it's no longer needed.

boehm_gc/Mmakefile:
	Use USING_MICROSOFT_CL_COMPILER to determine which makefile
	and make program to use when building the collector.


diff -u boehm_gc/Mmakefile boehm_gc/Mmakefile
--- boehm_gc/Mmakefile
+++ boehm_gc/Mmakefile
@@ -59,7 +59,6 @@
 clean_local:
 	MAKEFLAGS=""; export MAKEFLAGS; \
 	$(MAKE) $(BOEHMGC_MAKEFILE) $(MMAKEFLAGS) clean
-	rm -rf Release
 	rm -f libgc.$A libgc.so libpar_gc.$A libpar_gc.dll
 
 endif
only in patch2:
--- bindist/bindist.configure.in	16 Oct 2002 01:57:49 -0000	1.41
+++ bindist/bindist.configure.in	22 Oct 2002 14:48:45 -0000
@@ -75,7 +75,7 @@
 AC_SUBST(AR)
 AC_SUBST(ARFLAGS)
 AC_SUBST(AR_LIBFILE_OPT)
-AC_SUBST(BOEHMGC_MAKEFILE)
+AC_SUBST(USING_MICROSOFT_CL_COMPILER)
 AC_SUBST(EXE_SUFFIX)
 AC_SUBST(OBJ_SUFFIX)
 AC_SUBST(LIB_SUFFIX)
only in patch2:
--- bindist/bindist.build_vars.in	8 Sep 2002 17:09:44 -0000	1.19
+++ bindist/bindist.build_vars.in	22 Oct 2002 14:48:45 -0000
@@ -43,7 +43,7 @@
 AR="@AR@"
 ARFLAGS="@ARFLAGS@"
 AR_LIBFILE_OPT="@AR_LIBFILE_OPT@"
-BOEHMGC_MAKEFILE="@BOEHMGC_MAKEFILE@"
+USING_MICROSOFT_CL_COMPILER="@USING_MICROSOFT_CL_COMPILER@"
 EXE_SUFFIX="@EXE_SUFFIX@"
 OBJ_SUFFIX="@OBJ_SUFFIX@"
 LIB_SUFFIX="@LIB_SUFFIX@"

Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.67
diff -u -r1.67 Mmake.common.in
--- Mmake.common.in	29 Sep 2002 09:38:56 -0000	1.67
+++ Mmake.common.in	22 Oct 2002 14:48:44 -0000
@@ -203,8 +203,8 @@
 empty_string=
 OBJFILE_OPT=@OBJFILE_OPT@$(empty_string)
 
-# Which makefile to use when compiling the garbage collector.
-BOEHMGC_MAKEFILE=@BOEHMGC_MAKEFILE@
+# Are we compiling using the MS C compiler?
+USING_MICROSOFT_CL_COMPILER=@USING_MICROSOFT_CL_COMPILER@
 
 #-----------------------------------------------------------------------------#
 
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.329
diff -u -r1.329 configure.in
--- configure.in	21 Oct 2002 17:19:01 -0000	1.329
+++ configure.in	22 Oct 2002 14:48:45 -0000
@@ -405,7 +405,8 @@
 	AR="lib"
 	ARFLAGS=""
 	AR_LIBFILE_OPT="/OUT:"
-	BOEHMGC_MAKEFILE="-f NT_MAKEFILE"
+
+	USING_MICROSOFT_CL_COMPILER="yes"
 
 	CYGPATH="cygpath -w"
 
@@ -425,7 +426,8 @@
 	AR="ar"
 	ARFLAGS="cr"
 	AR_LIBFILE_OPT=""
-	BOEHMGC_MAKEFILE=""
+
+	USING_MICROSOFT_CL_COMPILER="yes"
 
 	CYGPATH=echo
 
@@ -449,7 +451,7 @@
 AC_SUBST(AR)
 AC_SUBST(ARFLAGS)
 AC_SUBST(AR_LIBFILE_OPT)
-AC_SUBST(BOEHMGC_MAKEFILE)
+AC_SUBST(USING_MICROSOFT_CL_COMPILER)
 AC_SUBST(OBJ_SUFFIX)
 AC_SUBST(LIB_SUFFIX)
 AC_SUBST(LIB_PREFIX)
Index: bindist/bindist.build_vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.build_vars.in,v
retrieving revision 1.19
diff -u -r1.19 bindist.build_vars.in
--- bindist/bindist.build_vars.in	8 Sep 2002 17:09:44 -0000	1.19
+++ bindist/bindist.build_vars.in	22 Oct 2002 14:48:45 -0000
@@ -43,7 +43,7 @@
 AR="@AR@"
 ARFLAGS="@ARFLAGS@"
 AR_LIBFILE_OPT="@AR_LIBFILE_OPT@"
-BOEHMGC_MAKEFILE="@BOEHMGC_MAKEFILE@"
+USING_MICROSOFT_CL_COMPILER="@USING_MICROSOFT_CL_COMPILER@"
 EXE_SUFFIX="@EXE_SUFFIX@"
 OBJ_SUFFIX="@OBJ_SUFFIX@"
 LIB_SUFFIX="@LIB_SUFFIX@"
Index: bindist/bindist.configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.configure.in,v
retrieving revision 1.41
diff -u -r1.41 bindist.configure.in
--- bindist/bindist.configure.in	16 Oct 2002 01:57:49 -0000	1.41
+++ bindist/bindist.configure.in	22 Oct 2002 14:48:45 -0000
@@ -75,7 +75,7 @@
 AC_SUBST(AR)
 AC_SUBST(ARFLAGS)
 AC_SUBST(AR_LIBFILE_OPT)
-AC_SUBST(BOEHMGC_MAKEFILE)
+AC_SUBST(USING_MICROSOFT_CL_COMPILER)
 AC_SUBST(EXE_SUFFIX)
 AC_SUBST(OBJ_SUFFIX)
 AC_SUBST(LIB_SUFFIX)
Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.21
diff -u -r1.21 Mmakefile
--- boehm_gc/Mmakefile	18 Oct 2002 04:16:09 -0000	1.21
+++ boehm_gc/Mmakefile	22 Oct 2002 14:48:46 -0000
@@ -37,21 +37,34 @@
 #	We also need to explicitly pass `-j1' after MMAKEFLAGS,
 #	to avoid doing a parallel make, for reasons explained at the
 #	top of Makefile.
+
+ifeq ("$(USING_MICROSOFT_CL_COMPILER)", "yes")
+
+submake: force
+	MAKEFLAGS=""; export MAKEFLAGS; \
+	nmake -f NT_MAKEFILE nodebug=1 gc.lib; \
+	cp gc.lib libgc.lib 
+
+clean_local:
+	rm -f *.obj gc.lib libgc.$A libpar_gc.$A libpar_gc.dll
+
+else
+
 submake: force
 	MAKEFLAGS=""; export MAKEFLAGS; \
-	$(MAKE) $(BOEHMGC_MAKEFILE) $(MMAKEFLAGS) -j1 GRADE=$(GRADE) \
-		GC_GRADE=$(GC_GRADE) \
+	$(MAKE) $(MMAKEFLAGS) -j1 GRADE=$(GRADE) GC_GRADE=$(GC_GRADE) \
 		lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB) \
 		$(EXT_FOR_SHARED_LIB)
 
-.PHONY: force
-force:
-
 clean_local:
 	MAKEFLAGS=""; export MAKEFLAGS; \
 	$(MAKE) $(BOEHMGC_MAKEFILE) $(MMAKEFLAGS) clean
-	rm -rf Release
 	rm -f libgc.$A libgc.so libpar_gc.$A libpar_gc.dll
+
+endif
+
+.PHONY: force
+force:
 
 #-----------------------------------------------------------------------------#
 

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