Win / x86_64 build fix: build expat using either BCC or MINGW, depending on toolchain used
--- a/xmlreaderimpl/Make.proto Tue May 12 12:20:53 2015 +0100
+++ b/xmlreaderimpl/Make.proto Tue May 12 13:07:00 2015 +0100
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES=-Isupport/expat-2.0.1/lib -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/xmlsuite/core
+LOCALINCLUDES=-Isupport/expat-2.0.1/lib -I$(INCLUDE_TOP)/stx/goodies/xmlsuite/core -I$(INCLUDE_TOP)/stx/libbasic
# if you need any additional defines for embedded C code,
@@ -97,12 +97,19 @@
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_goodies_xmlsuite_xmlreaderimpl.$(O): $(shell hg root)/.hg/dirstate
+endif
+
# run default testsuite for this package
test: $(TOP)/goodies/builder/reports
- $(MAKE) -C $(TOP)/goodies/builder/reports
+ $(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
@@ -132,7 +139,7 @@
# build all packages containing referenced classes for this package
-# they are nor needed to compile the package
+# they are not needed to compile the package (but later, to load it)
references:
@@ -148,7 +155,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)XMLv2__ExpatXMLReader.$(O) XMLv2__ExpatXMLReader.$(H): XMLv2__ExpatXMLReader.st $(INCLUDE_TOP)/stx/goodies/xmlsuite/core/XMLv2__XMLReader.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)stx_goodies_xmlsuite_xmlreaderimpl.$(O) stx_goodies_xmlsuite_xmlreaderimpl.$(H): stx_goodies_xmlsuite_xmlreaderimpl.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_xmlsuite_xmlreaderimpl.$(O) stx_goodies_xmlsuite_xmlreaderimpl.$(H): stx_goodies_xmlsuite_xmlreaderimpl.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/xmlreaderimpl/Make.spec Tue May 12 12:20:53 2015 +0100
+++ b/xmlreaderimpl/Make.spec Tue May 12 13:07:00 2015 +0100
@@ -42,6 +42,7 @@
# -warnNonStandard : no warnings about ST/X extensions
# -warnEOLComments : no warnings about EOL comment extension
# -warnPrivacy : no warnings about privateClass extension
+# -warnUnused : no warnings about unused variables
#
# ********** OPTIONAL: MODIFY the next line(s) ***
# STCWARNINGS=-warn
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlreaderimpl/Makefile.init Tue May 12 13:07:00 2015 +0100
@@ -0,0 +1,27 @@
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+# as filenames are not case sensitive (in a default setup),
+# we cannot use the above trick. Therefore, this file is now named
+# "Makefile.init", and you have to execute "make -f Makefile.init" to
+# get the initial makefile. This is now also done by the toplevel CONFIG
+# script.
+
+.PHONY: run
+
+run: makefile
+ $(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+ $(TOP)/rules/stmkmf
--- a/xmlreaderimpl/bc.mak Tue May 12 12:20:53 2015 +0100
+++ b/xmlreaderimpl/bc.mak Tue May 12 13:07:00 2015 +0100
@@ -30,19 +30,20 @@
!INCLUDE Make.spec
LIBNAME=libstx_goodies_xmlsuite_xmlreaderimpl
+MODULE_PATH=goodies\xmlsuite\xmlreaderimpl
RESFILES=xmlreaderimpl.$(RES)
-LOCALINCLUDES=-Isupport\expat-2.0.1\lib -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\xmlsuite\core
+LOCALINCLUDES=-Isupport\expat-2.0.1\lib -I$(INCLUDE_TOP)\stx\goodies\xmlsuite\core -I$(INCLUDE_TOP)\stx\libbasic
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
-LOCALLIBS="support/expat-2.0.1/bcb5/release/libexpats_mtd.lib"
+LOCALLIBS=$(LIBEXPAT)
OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
-ALL:: support/expat-2.0.1/bcb5/release/libexpats_mtd.lib classLibRule
+ALL:: $(LIBEXPAT) classLibRule
classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
@@ -61,9 +62,19 @@
-support/expat-2.0.1/bcb5/release/libexpats_mtd.lib:
- cd support/expat-2.0.1/bcb5
- $(MAKE)
+!ifdef USEMINGW64
+LIBEXPAT=support/expat-2.0.1/.libs/libexpat.a
+!else
+! ifdef USEMINGW32
+LIBEXPAT=support/expat-2.0.1/.libs/libexpat.a
+! else
+LIBEXPAT=support/expat-2.0.1/bcb5/release/libexpats_mtd.lib
+! endif
+!endif
+
+$(LIBEXPAT):
+ cd support/expat-2.0.1
+ $(MAKE_BAT)
cd ..\..\..
@@ -79,6 +90,15 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)XMLv2__ExpatXMLReader.$(O) XMLv2__ExpatXMLReader.$(H): XMLv2__ExpatXMLReader.st $(INCLUDE_TOP)\stx\goodies\xmlsuite\core\XMLv2__XMLReader.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)stx_goodies_xmlsuite_xmlreaderimpl.$(O) stx_goodies_xmlsuite_xmlreaderimpl.$(H): stx_goodies_xmlsuite_xmlreaderimpl.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_xmlsuite_xmlreaderimpl.$(O) stx_goodies_xmlsuite_xmlreaderimpl.$(H): stx_goodies_xmlsuite_xmlreaderimpl.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_goodies_xmlsuite_xmlreaderimpl.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlreaderimpl/support/expat-2.0.1/bmake.bat Tue May 12 13:07:00 2015 +0100
@@ -0,0 +1,3 @@
+pushd bcb5
+make -f makefile.mak
+popd
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlreaderimpl/support/expat-2.0.1/mingwmake.bat Tue May 12 13:07:00 2015 +0100
@@ -0,0 +1,8 @@
+..\..\
+set PATH_ORIG=%PATH%
+set PATH=%MINGW_DIR%\bin;C:\MSYS\1.0\bin;%PATH%
+if not exist makefile (
+ bash configure
+)
+C:\MSYS\1.0\bin\make
+set PATH=%PATH_ORIG%