[m-rev.] for review: build boehmgc with MSVC
Peter Ross
pro at missioncriticalit.com
Tue Oct 22 23:47:57 AEST 2002
Hi,
For fjh to review.
===================================================================
Estimated hours taken: 2
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.
configure.in:
Set USING_MICROSOFT_CL_COMPILER when we are using the MS
compiler.
Delete BOEHMGC_MAKEFILE.
Mmake.common.in:
Record the value of USING_MICROSOFT_CL_COMPILER.
Delete BOEHMGC_MAKEFILE.
boehm_gc/Mmakefile:
Use USING_MICROSOFT_CL_COMPILER to determine which makefile
and make program to use when building the collector.
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 13:42:17 -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 13:42:18 -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: 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 13:42:18 -0000
@@ -37,21 +37,35 @@
# 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 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