]> git.saurik.com Git - wxWidgets.git/commitdiff
added C++BuilderX support (disabled by default)
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 26 Oct 2003 20:45:27 +0000 (20:45 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 26 Oct 2003 20:45:27 +0000 (20:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/bakefiles/Bakefiles.bkgen
build/bakefiles/common.bkl
build/bakefiles/config.bkl
build/bakefiles/formats/FORMATS.bkmanifest
build/bakefiles/formats/README
build/bakefiles/formats/__fake.bkl
build/bakefiles/formats/cbx_unix.bkl [new file with mode: 0644]
build/bakefiles/formats/cbx_unix.empy [new file with mode: 0644]

index a93cd7ddd2d67f428919fead3829d3b06e53645a..0bd1f2b165bafb46df9e4b85ea65ea2157518415 100644 (file)
@@ -3,6 +3,30 @@
 
 <bakefile-gen>
 
+    <!--
+    Formats listed here are not generated by default. To enable them, either
+    remove them from the <disable-formats> directive below or create
+    Bakefiles.local.bkgen file in this directory and add <enable-formats>
+    into it:
+         <?xml version="1.0" ?>
+         <bakefile-gen>
+             <enable-formats>dmars</enable-formats>
+         </bakefile-gen>
+
+    Reasons why these formats are disabled (and so not in CVS):
+    
+    dmars     - In beta testing, will be added when it stabilizes.
+    cbuilderx - Generated projects are too bad to be included in CVS. Please
+                *do not* enable this format until FIXMEs in .bkl files related
+                to cbuilderx are addressed. In particular, the project must
+                be placed into build/msw(?) directory and store object files
+                in its subdirectory and it must copy setup.h as others do.
+    cbx_unix  - Doesn't intergrate well and won't be used by most Unix people.
+    -->
+    
+    <disable-formats>dmars,cbx_unix,cbuilderx</disable-formats>
+    
+
     <!-- These wildcards match all .bkl files in wxWindows tree: -->
     <input>
         wx.bkl
     </input>
 
     <!-- List of output formats to generate: -->
-    <add-formats>autoconf,borland,mingw,msvc,msvc6prj,watcom</add-formats>
+    <add-formats>
+        autoconf,borland,dmars,mingw,msvc,msvc6prj,watcom,cbuilderx,cbx_unix
+    </add-formats>
     
-    <del-formats files="../../samples/*.bkl">autoconf,msvc6prj</del-formats>
-    <del-formats files="../../demos/*.bkl">msvc6prj</del-formats>
-    <del-formats files="../../samples/html/html_samples.bkl">msvc6prj</del-formats>
-    <del-formats files="../../samples/mobile/mobile_samples.bkl">msvc6prj</del-formats>
-    <del-formats files="../../samples/opengl/opengl_samples.bkl">msvc6prj</del-formats>
-    <del-formats files="../../utils/*.bkl">msvc6prj</del-formats>
+    <del-formats files="../../samples/*.bkl">
+        autoconf,msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
+    <del-formats files="../../demos/*.bkl">
+        msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
+    <del-formats files="../../samples/html/html_samples.bkl">
+        msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
+    <del-formats files="../../samples/mobile/mobile_samples.bkl">
+        msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
+    <del-formats files="../../samples/opengl/opengl_samples.bkl">
+        msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
+    <del-formats files="../../utils/*.bkl">
+        msvc6prj,cbuilderx,cbx_unix
+    </del-formats>
 
     
     <!-- Default flags (for all formats and bakefiles): -->
     <add-flags files="wx.bkl" formats="msvc6prj">
         -o../msw/wx.dsw
     </add-flags>
+    <add-flags files="wx.bkl" formats="cbuilderx">
+        -o../../wx.cbx
+    </add-flags>
     <add-flags files="../../contrib/build/*/*.bkl" formats="autoconf">
         -o../../contrib/src/$(INPUT_FILE_BASENAME_NOEXT)/Makefile.in
     </add-flags>
+    <add-flags files="../../contrib/build/*/*.bkl" formats="cbx_unix">
+        -o../../contrib/src/$(INPUT_FILE_BASENAME_NOEXT)/$(INPUT_FILE_BASENAME_NOEXT)Unix.cbx
+    </add-flags>
+    <!-- FIXME: don't do this once it is possible (new CBX version) -->
+    <add-flags files="../../contrib/build/*/*.bkl" formats="cbuilderx">
+        -o../../contrib/src/$(INPUT_FILE_BASENAME_NOEXT)/$(INPUT_FILE_BASENAME_NOEXT).cbx
+    </add-flags>
     <add-flags files="../../contrib/build/*/*.bkl"
                formats="mingw,borland,dmars,watcom,msvc,msvc6prj">
         -DSRCDIR=../../src/$(INPUT_FILE_BASENAME_NOEXT)
index bd4ac24a2195e35c78c188ae14e6c7bcad301acd..36fb51ee46b94c943734fb4caca594451bc3c73a 100644 (file)
         <set var="CFG_NAME_PART">
             $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
         </set>
-        <set var="OBJS" make_var="1">$(COMPILER)_$(CFG_NAME_PART)</set>
+        <set var="OBJS" make_var="1">
+            <if cond="FORMAT!='cbuilderx'">$(COMPILER)_$(CFG_NAME_PART)</if>
+            <!-- FIXME: waiting for removal after CBX has better ../ dirs
+                 support -->
+            <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
+        </set>
+
         <set var="BUILDDIR">$(OBJS)</set>
     </if>
     
         <!-- system libraries on windows: -->
         <if cond="FORMAT!='autoconf'">
             <sys-lib>$(UNICOWS_LIB)</sys-lib>
-            <if cond="COMPILER=='bcc'">
+            <if cond="FORMAT=='borland'">
                 <sys-lib>ole2w32</sys-lib>
             </if>
-            <if cond="COMPILER!='bcc'">
+            <if cond="FORMAT!='bcc'">
                 <sys-lib>kernel32</sys-lib>
                 <sys-lib>user32</sys-lib>
                 <sys-lib>gdi32</sys-lib>
                 <sys-lib>advapi32</sys-lib>
                 <sys-lib>wsock32</sys-lib>
             </if>
-            <if cond="COMPILER=='vc' or COMPILER=='bcc'">
+            <if cond="FORMAT=='vc' or FORMAT=='bcc'">
                 <sys-lib>oleacc</sys-lib>
             </if>
         </if>        
index 7ed5d13dfb1b1bc194edcde0b7d0e8ce0e3c08ff..c936f48f3b5df090e8a08fac4326527fbcaa7805 100644 (file)
@@ -243,6 +243,13 @@ Set the version of your Mingw installation here.
         <set var="EXTRACFLAGS">$(GCCFLAGS) -DHAVE_W32API_H</set>
     </if>
 
+    <if cond="FORMAT=='cbuilderx'">
+        <set var="EXTRACFLAGS">
+            <if cond="COMPILER=='gcc'">-DHAVE_W32API_H</if>
+        </set>
+    </if>
+
+
     <!-- ================================================================== -->
     <!--            Project files - hardcode some defaults                  -->
     <!-- ================================================================== -->
@@ -262,6 +269,19 @@ Set the version of your Mingw installation here.
     </if>
 
 
+    <!-- FIXME:
+         C++BuilderX supports only wxMSW, monolithic (sic!) static build
+         and the project can't be put into build/msw and store objects in
+         build/msw/something. This *must* be fixed! -->
+    <if cond="FORMAT=='cbuilderx'">
+        <set var="WXUNIV">0</set>
+        <set var="MONOLITHIC">1</set>
+        <set var="SRCDIR">.</set>
+        <set var="TOP_SRCDIR">$(SRCDIR)/$(WXTOPDIR)</set>
+        <set var="SHARED">0</set>
+    </if>
+
+
     <!-- DigitalMars make is braindead, it doesn't have conditional
          processing: -->
     <if cond="FORMAT=='dmars'">
index 006dedd3bd1a540958f674ff38d7f9e8c28bd782..7e380ffe6a3ae6d99f49b6730a225caa47bee643 100644 (file)
         </description>
         <default-filename>xxx.spec</default-filename>
     </format>
+
+    <format id="cbx_unix">
+        <description>
+            C++BuilderX projects for Unix (use configure)
+        </description>
+        <default-filename>
+            $(os.path.splitext(os.path.basename(INPUT_FILE))[0])Unix.cbx
+        </default-filename>
+    </format>
     
 </bakefile-manifest>
index d21a6a4f9be23f24d864bfa1dee713abac0abec2..039ed338fc8e7bd54cfe2687076a6c6e12ec2d5f 100644 (file)
@@ -3,3 +3,4 @@ This directory contains misc Bakefile backends that are wxWindows-specific:
 
 wx24dsp     - generates wx2.4-compatible VC++ project file (src/wxWindows.dsp)
 rpmspec     - generates part of .spec files with list of wxBase headers
+cbx_unix    - Borland C++BuilderX project files for configure-based build
index 704b4dd37fbb547b4e01e314b571559c7ccd9bb7..21ab4a6d93006b9845cda9b739046ce0e624f73e 100644 (file)
@@ -12,6 +12,11 @@ makefiles, e.g. wx24dsp or rpmspec ones.
     <include file="win32.bkl"/>
 
     <define-rule name="__fake">
+        <template>
+            <__fake_hook/>
+        </template>
+    
+        <define-tag name="app-type"/>
         <define-tag name="sources"/>
         <define-tag name="libname"/>
         <define-tag name="dllname"/>
@@ -49,6 +54,11 @@ makefiles, e.g. wx24dsp or rpmspec ones.
         <define-tag name="sys-lib"/>
         <define-tag name="library"/>
         <define-tag name="command"/>
+        <define-tag name="mac-res"/>
+        <define-tag name="win32-res"/>
+        <define-tag name="is-phony"/>
+
+        <define-tag name="__fake_hook"/>
     </define-rule>
 
     <define-rule name="exe" extends="__fake"/>
diff --git a/build/bakefiles/formats/cbx_unix.bkl b/build/bakefiles/formats/cbx_unix.bkl
new file mode 100644 (file)
index 0000000..6707e61
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" ?>
+<!-- $Id$ -->
+
+<makefile>
+    
+    <include file="__fake.bkl"/>
+    <set var="COMPILER">vc</set>
+
+
+    <define-tag name="__fake_hook" rules="__fake">
+        <set var="type" overwrite="0">fake</set>
+    </define-tag>
+    
+    <define-tag name="__fake_hook" rules="exe">
+        <set var="type">exe</set>
+    </define-tag>
+
+    <output file="$(OUTPUT_FILE)" writer="cbx_unix.empy"/>
+    <set var="FORMAT_OUTPUT_VARIABLES">type</set>
+</makefile>
diff --git a/build/bakefiles/formats/cbx_unix.empy b/build/bakefiles/formats/cbx_unix.empy
new file mode 100644 (file)
index 0000000..b9309a1
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--C++BuilderX Project-->
+<project>
+  <property category="build.config" name="active" value="0"/>
+  <property category="build.config" name="count" value="1"/>
+  <property category="build.config" name="excludedefaultforzero" value="0"/>
+  <property category="build.config.0" name="builddir" value="Debug"/>
+  <property category="build.config.0" name="key" value="Debug_Build"/>
+  <property category="build.config.0" name="name" value="Debug Build"/>
+  <property category="build.config.0" name="settings.MinGW" value="default;debug"/>
+  <property category="build.config.0" name="settings.gnuc++" value="default;debug"/>
+  <property category="build.config.0" name="settings.intellinia32" value="default;debug"/>
+  <property category="build.config.0" name="settings.mswin32" value="default;debug"/>
+  <property category="build.config.0" name="type" value="Toolset"/>
+  <property category="build.config.1" name="key" value="Release_Build"/>
+  <property category="build.config.1" name="name" value="Release Build"/>
+  <property category="build.config.1" name="settings.MinGW" value="default;release"/>
+  <property category="build.config.1" name="settings.gnuc++" value="default;release"/>
+  <property category="build.config.1" name="settings.intellinia32" value="default;release"/>
+  <property category="build.config.1" name="settings.mswin32" value="default;release"/>
+  <property category="build.config.1" name="type" value="Toolset"/>
+  <property category="build.node" name="type" value="CBMakefileProjectType"/>
+  <property category="build.platform" name="active" value="linux"/>
+  <property category="build.platform" name="linux.Debug_Build.toolset" value="gnuc++"/>
+  <property category="build.platform" name="linux.Release_Build.toolset" value="gnuc++"/>
+  <property category="build.platform" name="linux.default" value="gnuc++"/>
+  <property category="build.platform" name="linux.gnuc++.enabled" value="1"/>
+  <property category="build.platform" name="linux.mswin32.enabled" value="0"/>
+  <property category="build.platform" name="linux.win32b.enabled" value="0"/>
+  <property category="build.platform" name="solaris.default" value="gnuc++"/>
+  <property category="build.platform" name="solaris.enabled" value="0"/>
+  <property category="build.platform" name="win32.default" value="MinGW"/>
+  <property category="build.platform" name="win32.enabled" value="0"/>
+  <property category="cbproject" name="lastnodeid" value="4"/>
+  <property category="cbproject" name="version" value="X.1.0"/>
+  <property category="classbrowser" name="enable" value="0"/>
+  <property category="classbrowser" name="parser.cpp.skip_standard_directories" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.I.arg.1" value="/usr/include"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.I.arg.2" value="/usr/include/g++-3"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.I.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.MD.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.O0.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.c.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.g.arg" value="2"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.g.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++compile" name="option.o.enabled" value="1"/>
+  <property category="linux.Debug_Build.gnuc++.g++link" name="option.o.enabled" value="1"/>
+  <property category="linux.gnuc++.Debug_Build" name="saved" value="1"/>
+  <property category="makefileproject" name="makefile.ID.1" value="1"/>
+  <property category="makefileproject" name="makefile.list.1" value="Makefile"/>
+  <property category="makefiletarget" name="makefile.1.params" value="-f Makefile"/>
+  <property category="makefiletarget" name="makefile.1.target.list.1" value="all"/>
+  <property category="makefiletarget" name="makefile.1.target.list.2" value="clean"/>
+  <property category="runtime" name="ConfigurationCount" value="@(len([t for t in targets if t.type=='exe'])-1)"/>
+@{
+ALL_EXES = [x for x in targets if x.type=='exe']
+if len(ALL_EXES) == 1:
+    DEFAULT_EXE = 0
+else:
+    DEFAULT_EXE = -1
+}@
+  <property category="runtime" name="DefaultConfiguration" value="@DEFAULT_EXE"/>
+@[for i in range(0,len(ALL_EXES))]@
+  <property category="runtime.@i" name="BuildTargetOnRun" value="com.borland.cbuilder.build.CBProjectBuilder$ProjectBuildAction;make"/>
+  <property category="runtime.@i" name="ConfigurationName" value="@ALL_EXES[i].id"/>
+  <property category="runtime.@i" name="RunnableType" value="com.borland.cbuilder.runtime.ExecutableRunner"/>
+  <property category="runtime.@i" name="native.exec.path" value="./@ALL_EXES[i].id"/>
+  <property category="runtime.@i" name="native.startdir.path" value="."/>
+  <property category="runtime.@i" name="native.target.override" value="1"/>
+@[end for]@
+  <property category="unique" name="id" value="4"/>
+  <node name="console" type="NavigationDirectory">
+    <property category="directorynode" name="showSubdirectories" value="1"/>
+    <property category="directorynode" name="url" value="."/>
+    <property category="unique" name="id" value="1"/>
+  </node>
+</project>