Build files fixed for Windiws / MINGW64. Added clean and clobber of expat.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 05 Feb 2016 02:29:58 +0000
changeset 302 6bae0bc229ec
parent 301 1bfe4ecc6c10
child 303 04365cd0296b
Build files fixed for Windiws / MINGW64. Added clean and clobber of expat.
core/Make.proto
core/XMLv2__Entity.st
core/bc.mak
core/stx_goodies_xmlsuite_core.st
--- a/core/Make.proto	Tue Feb 02 22:25:17 2016 +0000
+++ b/core/Make.proto	Fri Feb 05 02:29:58 2016 +0000
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES=-Iexpat-2.0.1/lib -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg2
+LOCALINCLUDES=-I$(LIBEXPAT_DIR)/lib -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg2
 
 
 # if you need any additional defines for embedded C code,
@@ -49,7 +49,7 @@
 
 # ********** OPTIONAL: MODIFY the next line ***
 # additional C-libraries that should be pre-linked with the class-objects
-LD_OBJ_LIBS=expat-2.0.1/build/lib/libexpat.a
+LD_OBJ_LIBS=$(LIBEXPAT)
 LOCAL_SHARED_LIBS=
 
 
@@ -60,16 +60,29 @@
 OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
 
 
+LIBEXPAT_DIR=expat-2.0.1
+LIBEXPAT=expat-2.0.1/lib/libexpat.a
+
 
 all:: preMake classLibRule postMake
 
-pre_objs:: expat-2.0.1/build/lib/libexpat.a 
+pre_objs:: $(LIBEXPAT) 
 
 
-expat-2.0.1/build/lib/libexpat.a:
-	mkdir expat-2.0.1/build && cd expat-2.0.1/build && CC=$(CC) CFLAGS="$(CCCONFOPT) -fPIC" ../configure --prefix=$$PWD
-	$(MAKE) -C expat-2.0.1/build
-	$(MAKE) -C expat-2.0.1/build install
+$(LIBEXPAT): $(LIBEXPAT_DIR)/config.status
+	$(MAKE) -C expat-2.0.1
+	$(MAKE) -C expat-2.0.1 install
+
+$(LIBEXPAT_DIR)/config.status:
+	cd $(LIBEXPAT_DIR) && CC=$(CC) CFLAGS="$(CCCONFOPT) -fPIC" ./configure --prefix=$$PWD
+
+clobber::
+	-$(MAKE) -C $(LIBEXPAT_DIR) distclean
+
+clean::
+	-$(MAKE) -C $(LIBEXPAT_DIR) clean
+
+        
 
 
 
--- a/core/XMLv2__Entity.st	Tue Feb 02 22:25:17 2016 +0000
+++ b/core/XMLv2__Entity.st	Fri Feb 05 02:29:58 2016 +0000
@@ -168,6 +168,12 @@
     ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__Entity.st,v 1.2 2005-12-25 10:52:23 vranyj1 Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$Id$'
 ! !
+
--- a/core/bc.mak	Tue Feb 02 22:25:17 2016 +0000
+++ b/core/bc.mak	Fri Feb 05 02:29:58 2016 +0000
@@ -34,18 +34,21 @@
 RESFILES=core.$(RES)
 
 
+LIBEXPAT_DIR=expat-2.0.1
 !ifdef USEMINGW64
-LIBEXPAT=expat-2.0.1/.libs/libexpat.a
+LIBEXPAT=$(LIBEXPAT_DIR)/.libs/libexpat.a
+LIBEXPAT_TARGET   = x86_64-w64-mingw32
 !else
 ! ifdef USEMINGW32
-LIBEXPAT=expat-2.0.1/.libs/libexpat.a
+LIBEXPAT=$(LIBEXPAT_DIR)/.libs/libexpat.a
+LIBEXPAT_TARGET   = i686-pc-mingw32
 ! else
-LIBEXPAT=expat-2.0.1/bcb5/release/libexpats_mtd.lib
+LIBEXPAT$(LIBEXPAT_DIR)/bcb5/release/libexpats_mtd.lib
 ! endif
 !endif      
 
 
-LOCALINCLUDES=-Iexpat-2.0.1\lib -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg2
+LOCALINCLUDES=-I$(LIBEXPAT_DIR)\lib -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg2
 LOCALDEFINES=
 
 STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
@@ -71,11 +74,25 @@
 
 
 
+!if defined(USEMINGW32) || defined(USEMINGW64)
+$(LIBEXPAT): $(LIBEXPAT_DIR)/config.status
+	pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & make
+
+$(LIBEXPAT_DIR)/config.status:
+	pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & bash configure --build=$(LIBEXPAT_TARGET)
+
+clobber::
+	-pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & IF EXIST makefile (make distclean)
+
+clean::
+	-pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & IF EXIST makefile (make clean)
+
+!else
 $(LIBEXPAT):
-	pushd expat-2.0.1
+	pushd $(LIBEXPAT_DIR)
 	$(MAKE_BAT)
 	popd
-
+!endif
 
 
 
--- a/core/stx_goodies_xmlsuite_core.st	Tue Feb 02 22:25:17 2016 +0000
+++ b/core/stx_goodies_xmlsuite_core.st	Fri Feb 05 02:29:58 2016 +0000
@@ -77,18 +77,34 @@
      Subclasses may redefine this."
 
     ^ '
+LIBEXPAT_DIR=expat-2.0.1
 !!ifdef USEMINGW64
-LIBEXPAT=expat-2.0.1/.libs/libexpat.a
+LIBEXPAT=$(LIBEXPAT_DIR)/.libs/libexpat.a
+LIBEXPAT_TARGET   = x86_64-w64-mingw32
 !!else
 !! ifdef USEMINGW32
-LIBEXPAT=expat-2.0.1/.libs/libexpat.a
+LIBEXPAT=$(LIBEXPAT_DIR)/.libs/libexpat.a
+LIBEXPAT_TARGET   = i686-pc-mingw32
 !! else
-LIBEXPAT=expat-2.0.1/bcb5/release/libexpats_mtd.lib
+LIBEXPAT$(LIBEXPAT_DIR)/bcb5/release/libexpats_mtd.lib
 !! endif
 !!endif      
 '
 
     "Created: / 02-02-2016 / 22:19:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-02-2016 / 02:06:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+additionalDefinitions_make_dot_proto
+    "allows for additional definitions/rules to be added to the bc.mak file.
+     Subclasses may redefine this."
+
+    ^ '
+LIBEXPAT_DIR=expat-2.0.1
+LIBEXPAT=expat-2.0.1/lib/libexpat.a
+'
+
+    "Created: / 05-02-2016 / 02:26:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalLinkLibraries_bc_dot_mak
@@ -106,38 +122,63 @@
 additionalLinkLibraries_make_dot_proto
     "allows for additional static libraries to be added to the make.proto file."
 
-    ^ 'expat-2.0.1/build/lib/libexpat.a'
+    ^'$(LIBEXPAT)'
 
     "Created: / 22-08-2006 / 23:53:33 / cg"
+    "Modified: / 04-02-2016 / 17:08:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalRules_bc_dot_mak
     "obsolete - kept for compatibility with old project files"
     
     ^ '
+!!if defined(USEMINGW32) || defined(USEMINGW64)
+$(LIBEXPAT): $(LIBEXPAT_DIR)/config.status
+        pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & make
+
+$(LIBEXPAT_DIR)/config.status:
+        pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & bash configure --build=$(LIBEXPAT_TARGET)
+
+clobber::
+        -pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & IF EXIST makefile (make distclean)
+
+clean::
+        -pushd $(LIBEXPAT_DIR) & set "PATH=C:\MINGW\MSYS\1.0\bin;C:\MSYS\1.0\bin;%%PATH%%" & IF EXIST makefile (make clean)
+
+!!else
 $(LIBEXPAT):
-        pushd expat-2.0.1
+        pushd $(LIBEXPAT_DIR)
         $(MAKE_BAT)
         popd
-
+!!endif
 '
 
     "Created: / 09-01-2010 / 14:03:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-02-2016 / 22:21:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-02-2016 / 02:20:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalRules_make_dot_proto
     "allows for additional rules to be added to the make.proto file."
 
     ^ '
-expat-2.0.1/build/lib/libexpat.a:
-        mkdir expat-2.0.1/build && cd expat-2.0.1/build && CC=$(CC) CFLAGS="$(CCCONFOPT) -fPIC" ../configure --prefix=$$PWD
-        $(MAKE) -C expat-2.0.1/build
-        $(MAKE) -C expat-2.0.1/build install
+$(LIBEXPAT): $(LIBEXPAT_DIR)/config.status
+        $(MAKE) -C expat-2.0.1
+        $(MAKE) -C expat-2.0.1 install
+
+$(LIBEXPAT_DIR)/config.status:
+        cd $(LIBEXPAT_DIR) && CC=$(CC) CFLAGS="$(CCCONFOPT) -fPIC" ./configure --prefix=$$PWD
+
+clobber::
+        -$(MAKE) -C $(LIBEXPAT_DIR) distclean
+
+clean::
+        -$(MAKE) -C $(LIBEXPAT_DIR) clean
+
+        
 '
 
     "Created: / 22-08-2006 / 23:59:16 / cg"
-    "Modified: / 22-04-2013 / 16:38:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-02-2016 / 02:27:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalTargets_bc_dot_mak
@@ -152,17 +193,19 @@
 additionalTargets_make_dot_proto
     "allows for additional targets to be added to the make.proto file."
 
-    ^ 'expat-2.0.1/build/lib/libexpat.a'
+    ^ '$(LIBEXPAT)'
 
     "Created: / 22-08-2006 / 23:53:33 / cg"
+    "Modified: / 04-02-2016 / 17:07:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 localIncludes
     "allow for the specification of additional include directories"
 
-    ^ '-Iexpat-2.0.1/lib'
+    ^ '-I$(LIBEXPAT_DIR)/lib'
 
     "Created: / 09-01-2010 / 14:03:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-02-2016 / 02:08:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !stx_goodies_xmlsuite_core class methodsFor:'description - contents'!