Author: wyoung
Date: Fri Jan 12 08:55:30 2007
New Revision: 1359

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1359&view=rev
Log:
- Added ability to turn off library building, to get an examples-only
  makefile, useful for distributing as an example.
- Using new feature in bootstrap script to generate Makefile.simple.

Modified:
    trunk/Bakefiles.bkgen
    trunk/HACKERS
    trunk/bootstrap
    trunk/mysql++.bkl

Modified: trunk/Bakefiles.bkgen
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/Bakefiles.bkgen?rev=1359&r1=1358&r2=1359&view=diff
==============================================================================
--- trunk/Bakefiles.bkgen (original)
+++ trunk/Bakefiles.bkgen Fri Jan 12 08:55:30 2007
@@ -6,12 +6,8 @@
 
     <!-- List of output formats to generate: -->
     <add-formats>
-        autoconf,gnu,msvc6prj,mingw
+        autoconf,msvc6prj,mingw
     </add-formats>
-
-    <add-flags formats="gnu">
-        -o$(INPUT_FILE_DIR)/Makefile.simple
-    </add-flags>
 
     <add-flags formats="mingw">
         -o$(INPUT_FILE_DIR)/Makefile.mingw

Modified: trunk/HACKERS
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/HACKERS?rev=1359&r1=1358&r2=1359&view=diff
==============================================================================
--- trunk/HACKERS (original)
+++ trunk/HACKERS Fri Jan 12 08:55:30 2007
@@ -79,7 +79,7 @@
        Unixy platform, you can run the "rebake" script to regenerate
        all the Makefiles and project files:
        
-               $ ./rebake
+               $ ./rebake [bakefile-options]
        
        If you're on Windows, things are a little trickier, because
        the native Win32 port of Bakefile is incomplete, and Bakefile
@@ -95,7 +95,7 @@
        the bootstrap script.  The bootstrap script also has other
        functions:
 
-               $ ./bootstrap [pedantic] [noexamples] [configure options]
+               $ ./bootstrap [pedantic] [noexamples] [nolibrary] [configure 
options]
 
        If you pass 'pedantic' to the bootstrap script, it will set
        up the autoconf build system so it turns on all of GCC's
@@ -105,6 +105,9 @@
 
        If you pass 'noexamples', the generated Makefiles and project
        files won't try to build any of the examples.
+
+       If you pass 'nolibrary', the generated Makefiles and project
+       files won't try to build the MySQL++ library.
 
        You can pass any of the previous options in any order.
        As soon as the bootstrap script sees an option that it

Modified: trunk/bootstrap
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/bootstrap?rev=1359&r1=1358&r2=1359&view=diff
==============================================================================
--- trunk/bootstrap (original)
+++ trunk/bootstrap Fri Jan 12 08:55:30 2007
@@ -6,7 +6,12 @@
 do
        case "$1" in
                noexamples)
-                       BF_OPTIONS="-DEXAMPLES=no $BF_OPTIONS"
+                       BF_OPTIONS="-DBUILDEXAMPLES=no $BF_OPTIONS"
+                       shift
+                       ;;
+
+               nolibrary)
+                       BF_OPTIONS="-DBUILDLIBRARY=no $BF_OPTIONS"
                        shift
                        ;;
 
@@ -30,6 +35,7 @@
 set -x
 
 ./rebake $BF_OPTIONS &&
+       bakefile -f gnu -o Makefile.simple -DBUILDLIBRARY=no mysql++.lib &&
        aclocal -I config -I /usr/local/share/aclocal &&
        autoheader &&
        autoconf &&

Modified: trunk/mysql++.bkl
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/mysql%2B%2B.bkl?rev=1359&r1=1358&r2=1359&view=diff
==============================================================================
--- trunk/mysql++.bkl (original)
+++ trunk/mysql++.bkl Fri Jan 12 08:55:30 2007
@@ -26,88 +26,93 @@
         <if cond="BUILD=='release'">off</if>
     </set>
 
-       <set var="EXAMPLES">yes</set>
+       <set var="BUILDLIBRARY">yes</set>
+       <set var="BUILDEXAMPLES">yes</set>
        <set var="HEADER_DIR">$(PREFIX)/include/mysql++</set>
 
-       <dll id="mysqlpp">
-               <sources>
-                       lib/coldata.cpp
-                       lib/connection.cpp
-                       lib/datetime.cpp
-                       lib/field_names.cpp
-                       lib/fields.cpp
-                       lib/field_types.cpp
-                       lib/manip.cpp
-                       lib/myset.cpp
-                       lib/qparms.cpp
-                       lib/query.cpp
-                       lib/result.cpp
-                       lib/row.cpp
-                       lib/sql_string.cpp
-                       lib/string_util.cpp 
-                       lib/transaction.cpp
-                       lib/type_info.cpp
-                       lib/vallist.cpp
-               </sources>
-
-               <debug-info>$(DEBUGINFO)</debug-info>
-
-               <threading>$(THREAD_TYPE)</threading>
-               <cxx-rtti>on</cxx-rtti>
-               <cxx-exceptions>on</cxx-exceptions>
-               
-               <install-to>$(LIBDIR)</install-to>
-               
-               <if cond="FORMAT in ['msvc6prj', 'mingw']">
-                       <define>_UNICODE</define>
-                       <include>"C:\Program Files\MySQL\MySQL Server 
5.0\include"</include>
-                       <lib-path>C:\Program Files\MySQL\MySQL Server 
5.0\lib\opt</lib-path>
-               </if>
-
-               <if cond="FORMAT=='msvc6prj'">
-                       <define>MYSQLPP_MAKING_DLL</define>
-                       <sys-lib>libmysql</sys-lib>
-               </if>
-
-               <if cond="FORMAT=='mingw'">
-                       <define>MYSQLPP_NO_DLL</define>
-                       <sys-lib>mysqlclient</sys-lib>
-               </if>
-
-               <if cond="FORMAT=='autoconf'">
-                       <depends>lib/custom.h</depends>
-                       <depends>lib/querydef.h</depends>
-
-                       <cxxflags>@PTHREAD_CFLAGS@</cxxflags>
-                       <include>.</include>
-                       <ldflags>@PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@</ldflags>
-                       <ldflags>-Wl,-soname -Wl,libmysqlpp.so.2</ldflags>
-                       <sys-lib>@MYSQL_C_LIB@</sys-lib>
-
-                       <if cond="ZLIB=='yes'">
-                               <sys-lib>z</sys-lib>
-                       </if>
-
-                       <modify-target target="uninstall">
-                               <command>
-                                       rm -f 
$(DESTDIR)$(libdir)/$(DLLPREFIX)mysqlpp.$(SO_SUFFIX)
-                               </command>
-                               <command>
-                                       for f in *.h ; do rm -f 
$(HEADER_DIR)/$(DBLDOLLAR)f ; done
-                               </command>
-                               <command>rmdir $(HEADER_DIR)</command>
-                       </modify-target>
-               </if>
-       </dll>
-
-       <data-files>
-               <files>lib/*.h</files>
-               <install-to>$(HEADER_DIR)</install-to>
-       </data-files>
+       <if cond="BUILDLIBRARY=='yes'">
+               <dll id="mysqlpp">
+                       <sources>
+                               lib/coldata.cpp
+                               lib/connection.cpp
+                               lib/datetime.cpp
+                               lib/field_names.cpp
+                               lib/fields.cpp
+                               lib/field_types.cpp
+                               lib/manip.cpp
+                               lib/myset.cpp
+                               lib/qparms.cpp
+                               lib/query.cpp
+                               lib/result.cpp
+                               lib/row.cpp
+                               lib/sql_string.cpp
+                               lib/string_util.cpp 
+                               lib/transaction.cpp
+                               lib/type_info.cpp
+                               lib/vallist.cpp
+                       </sources>
+
+                       <debug-info>$(DEBUGINFO)</debug-info>
+
+                       <threading>$(THREAD_TYPE)</threading>
+                       <cxx-rtti>on</cxx-rtti>
+                       <cxx-exceptions>on</cxx-exceptions>
+                       
+                       <install-to>$(LIBDIR)</install-to>
+                       
+                       <if cond="FORMAT in ['msvc6prj', 'mingw']">
+                               <define>_UNICODE</define>
+                               <include>"C:\Program Files\MySQL\MySQL Server 
5.0\include"</include>
+                               <lib-path>C:\Program Files\MySQL\MySQL Server 
5.0\lib\opt</lib-path>
+                       </if>
+
+                       <if cond="FORMAT=='msvc6prj'">
+                               <define>MYSQLPP_MAKING_DLL</define>
+                               <sys-lib>libmysql</sys-lib>
+                       </if>
+
+                       <if cond="FORMAT=='mingw'">
+                               <define>MYSQLPP_NO_DLL</define>
+                               <sys-lib>mysqlclient</sys-lib>
+                       </if>
+
+                       <if cond="FORMAT=='autoconf'">
+                               <depends>lib/custom.h</depends>
+                               <depends>lib/querydef.h</depends>
+
+                               <cxxflags>@PTHREAD_CFLAGS@</cxxflags>
+                               <include>.</include>
+                               <ldflags>@PTHREAD_LIBS@ 
@MYSQLPP_EXTRA_LIBS@</ldflags>
+                               <ldflags>-Wl,-soname 
-Wl,libmysqlpp.so.2</ldflags>
+                               <sys-lib>@MYSQL_C_LIB@</sys-lib>
+
+                               <if cond="ZLIB=='yes'">
+                                       <sys-lib>z</sys-lib>
+                               </if>
+
+                               <modify-target target="uninstall">
+                                       <command>
+                                               rm -f 
$(DESTDIR)$(libdir)/$(DLLPREFIX)mysqlpp.$(SO_SUFFIX)
+                                       </command>
+                                       <command>
+                                               for f in *.h ; do rm -f 
$(HEADER_DIR)/$(DBLDOLLAR)f ; done
+                                       </command>
+                                       <command>rmdir $(HEADER_DIR)</command>
+                               </modify-target>
+                       </if>
+               </dll>
+
+               <data-files>
+                       <files>lib/*.h</files>
+                       <install-to>$(HEADER_DIR)</install-to>
+               </data-files>
+       </if>   <!-- build library -->
 
        <!-- Set up build options common to all examples -->
        <template id="common-example">
-               <depends>mysqlpp</depends>
+               <if cond="BUILDLIBRARY=='yes'">
+                       <depends>mysqlpp</depends>
+               </if>
        
                <threading>$(THREAD_TYPE)</threading>
                <cxx-rtti>on</cxx-rtti>
@@ -169,7 +174,7 @@
        </template>
 
        <!-- Define output targets, if common-examples are enabled -->
-       <if cond="EXAMPLES=='yes'">
+       <if cond="BUILDEXAMPLES=='yes'">
                <!-- The "util" convenience library -->
                <lib id="util" template="common-example">
                        <libname>mysqlpp_util</libname>
@@ -234,7 +239,7 @@
                <exe id="updel" template="common-example">
                        <sources>examples/updel.cpp</sources>
                </exe>
-       </if>
+       </if>   <!-- build examples -->
 
        <if cond="FORMAT=='autoconf'">
                <action id="lib/custom.h">


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to