Author: wyoung
Date: Sat Jan  6 05:35:22 2007
New Revision: 1348

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1348&view=rev
Log:
Collapsed lib/lib.bkl and examples/examples.bkl into the top-level
mysql++.bkl file.  This makes it much easier to track dependencies
between the library and the examples, especially under VC++.

Removed:
    trunk/common.bkl
    trunk/examples/examples.bkl
    trunk/lib/lib.bkl
Modified:
    trunk/   (props changed)
    trunk/Bakefiles.bkgen
    trunk/bootstrap
    trunk/configure.ac
    trunk/examples/   (props changed)
    trunk/mysql++.bkl
    trunk/rebake

Propchange: trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jan  6 05:35:22 2007
@@ -1,8 +1,16 @@
+*.a
+*.so
+
+*.dsp
+*.dsw
+
 .bakefile_gen.state
+.deps
 
 Makefile
 Makefile.in
 Makefile.mingw
+Makefile.simple
 aclocal.m4
 autom4te.cache
 bk-deps
@@ -10,10 +18,21 @@
 configure
 install-sh
 
-mysql++.dsw
-
 mysql++.spec
 
 mysql++-*.gz
 
+cgi_image
+complic1
+custom[0-9]
+dbinfo
+fieldinf1
+load_file
+multiquery
+resetdb
+simple[0-9]
+updel
+usequery
+xaction
+
 tags

Modified: trunk/Bakefiles.bkgen
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/Bakefiles.bkgen?rev=1348&r1=1347&r2=1348&view=diff
==============================================================================
--- trunk/Bakefiles.bkgen (original)
+++ trunk/Bakefiles.bkgen Sat Jan  6 05:35:22 2007
@@ -2,14 +2,16 @@
 <bakefile-gen>
     <input>
         ./mysql++.bkl
-               lib/lib.bkl
-               examples/examples.bkl
     </input>
 
     <!-- List of output formats to generate: -->
     <add-formats>
-        autoconf,msvc6prj,mingw
+        autoconf,gnu,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/bootstrap
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/bootstrap?rev=1348&r1=1347&r2=1348&view=diff
==============================================================================
--- trunk/bootstrap (original)
+++ trunk/bootstrap Sat Jan  6 05:35:22 2007
@@ -33,6 +33,6 @@
        aclocal -I config -I /usr/local/share/aclocal &&
        autoheader &&
        autoconf &&
-       ./reconf $* &&
-       ( cd lib ; make custom.h querydef.h )
+       ./reconf --enable-maintainer-mode $* &&
+       make lib/custom.h lib/querydef.h
 

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/configure.ac?rev=1348&r1=1347&r2=1348&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Jan  6 05:35:22 2007
@@ -84,6 +84,5 @@
 #
 # Configure process complete; write out files generated from *.in.
 #
-AC_OUTPUT([Makefile lib/Makefile examples/Makefile 
-               mysql++.spec lib/Doxyfile lib/mysql++.h])
+AC_OUTPUT([Makefile mysql++.spec lib/Doxyfile lib/mysql++.h])
 

Propchange: trunk/examples/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jan  6 05:35:22 2007
@@ -30,17 +30,4 @@
 Makefile.mingw
 Makefile.simple
 
-cgi_image
-complic1
-custom[0-9]
-dbinfo
-fieldinf1
-load_file
-multiquery
-resetdb
-simple[0-9]
-updel
-usequery
-xaction
-
 tags

Modified: trunk/mysql++.bkl
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/mysql%2B%2B.bkl?rev=1348&r1=1347&r2=1348&view=diff
==============================================================================
--- trunk/mysql++.bkl (original)
+++ trunk/mysql++.bkl Sat Jan  6 05:35:22 2007
@@ -1,124 +1,261 @@
 <?xml version="1.0"?>
 <makefile>
-       <include file="common.bkl"/>
-
-       <subproject id="lib">
-               <dir>lib</dir>
-               <dependency-of>all</dependency-of>
-       </subproject>
-
-       <subproject id="examples">
-               <dir>examples</dir>
-               <installable>no</installable>
-               <dependency-of>all</dependency-of>
-       </subproject>
+       <requires version="0.1.9"/>
+       <using module="datafiles"/>
+       <include file="presets/simple.bkl"/>
+
+       <set var="DBLDOLLAR">$(DOLLAR)$(DOLLAR)</set>
+       <set var="ZLIB">yes</set>
+
+       <set var="THREAD_TYPE">single</set>
+       <if cond="FORMAT in ['msvc6prj', 'mingw']">
+               <set var="THREAD_TYPE">multi</set>
+       </if>
+               
+    <option name="BUILD">
+        <values>debug,release</values>
+        <values-description>Debug,Release</values-description>
+        <default-value>debug</default-value>
+        <description>
+            Type of compiled binaries
+        </description>
+    </option>
+
+    <set var="DEBUGINFO">
+        <if cond="BUILD=='debug'">on</if>
+        <if cond="BUILD=='release'">off</if>
+    </set>
+
+       <set var="EXAMPLES">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>
+
+       <!-- Set up build options common to all examples -->
+       <template id="common-example">
+               <depends>mysqlpp</depends>
+       
+               <threading>$(THREAD_TYPE)</threading>
+               <cxx-rtti>on</cxx-rtti>
+               <cxx-exceptions>on</cxx-exceptions>
+               <debug-info>$(DEBUGINFO)</debug-info>
+
+               <include>lib</include>
+
+               <if cond="FORMAT in ['autoconf', 'mingw', 'gnu']">
+                       <lib-path>.</lib-path>
+               </if>
+               <if cond="FORMAT=='msvc6prj'">
+                       <lib-path>$(BUILD)</lib-path>
+               </if>
+
+               <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>
+                       <sys-lib>mysqlpp</sys-lib>
+               </if>
+
+               <if cond="FORMAT=='msvc6prj'">
+                       <sys-lib>libmysql</sys-lib>
+               </if>
+
+               <if cond="FORMAT=='mingw'">
+                       <ldflags>-Wl,--enable-auto-import</ldflags>
+                       <define>MYSQLPP_NO_DLL</define>
+                       <lib-path>..\lib</lib-path>
+                       <sys-lib>mysqlclient</sys-lib>
+               </if>
+
+               <if cond="FORMAT=='autoconf'">
+                       <cxxflags>@PTHREAD_CFLAGS@</cxxflags>
+                       <ldflags>@PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@</ldflags>
+                       <sys-lib>@MYSQL_C_LIB@</sys-lib>
+
+                       <warnings>max</warnings>
+                       <sys-lib>mysqlpp</sys-lib>
+                       <if cond="ZLIB=='yes'">
+                               <sys-lib>z</sys-lib>
+                       </if>
+               </if>
+
+               <if cond="FORMAT=='gnu'">
+                       <include>/usr/include/mysql</include>
+                       <include>/usr/include/mysql++</include>
+                       <sys-lib>mysqlpp</sys-lib>
+                       <sys-lib>mysqlclient</sys-lib>
+               </if>
+       </template>
+
+       <!-- Additional options specific to examples that depend on
+            the util module. -->
+       <template id="util-example">
+               <depends>util</depends>
+               <sys-lib>mysqlpp_util</sys-lib>
+       </template>
+
+       <!-- Define output targets, if common-examples are enabled -->
+       <if cond="EXAMPLES=='yes'">
+               <!-- The "util" convenience library -->
+               <lib id="util" template="common-example">
+                       <libname>mysqlpp_util</libname>
+                       <sources>examples/util.cpp</sources>
+               </lib>
+               
+               <!-- The "standard" examples, being the ones that depend on
+                       the util library. -->
+               <exe id="resetdb" template="util-example,common-example">
+                       <sources>examples/resetdb.cpp</sources>
+               </exe>
+               <exe id="simple1" template="util-example,common-example">
+                       <sources>examples/simple1.cpp</sources>
+               </exe>
+               <exe id="simple2" template="util-example,common-example">
+                       <sources>examples/simple2.cpp</sources>
+               </exe>
+               <exe id="simple3" template="util-example,common-example">
+                       <sources>examples/simple3.cpp</sources>
+               </exe>
+               <exe id="usequery" template="util-example,common-example">
+                       <sources>examples/usequery.cpp</sources>
+               </exe>
+               <exe id="multiquery" template="util-example,common-example">
+                       <sources>examples/multiquery.cpp</sources>
+               </exe>
+               <exe id="custom1" template="util-example,common-example">
+                       <sources>examples/custom1.cpp</sources>
+               </exe>
+               <exe id="custom2" template="util-example,common-example">
+                       <sources>examples/custom2.cpp</sources>
+               </exe>
+               <exe id="custom3" template="util-example,common-example">
+                       <sources>examples/custom3.cpp</sources>
+               </exe>
+               <exe id="custom4" template="util-example,common-example">
+                       <sources>examples/custom4.cpp</sources>
+               </exe>
+               <exe id="custom5" template="util-example,common-example">
+                       <sources>examples/custom5.cpp</sources>
+               </exe>
+               <exe id="custom6" template="util-example,common-example">
+                       <sources>examples/custom6.cpp</sources>
+               </exe>
+               <exe id="dbinfo" template="util-example,common-example">
+                       <sources>examples/dbinfo.cpp</sources>
+               </exe>
+               <exe id="fieldinf1" template="util-example,common-example">
+                       <sources>examples/fieldinf1.cpp</sources>
+               </exe>
+               <exe id="xaction" template="util-example,common-example">
+                       <sources>examples/xaction.cpp</sources>
+               </exe>
+
+               <!-- The few examples that don't use the util module -->
+               <exe id="cgi_image" template="common-example">
+                       <sources>examples/cgi_image.cpp</sources>
+               </exe>
+               <exe id="load_file" template="common-example">
+                       <sources>examples/load_file.cpp</sources>
+               </exe>
+               <exe id="updel" template="common-example">
+                       <sources>examples/updel.cpp</sources>
+               </exe>
+       </if>
 
        <if cond="FORMAT=='autoconf'">
-               <set var="PKGNAME">[EMAIL PROTECTED]@</set>
-                       
-               <modify-target target="install">
-                       <command>(cd lib &amp;&amp; $(DOLLAR)(MAKE) 
install)</command>
-               </modify-target>
-
-               <modify-target target="uninstall">
-                       <command>(cd lib &amp;&amp; $(DOLLAR)(MAKE) 
uninstall)</command>
-               </modify-target>
-
-               <action id="dist">
-                       <depends>dist-build</depends>
-                       <command>tar czf $(PKGNAME).tar.gz $(PKGNAME)</command>
-                       <command>rm -rf $(PKGNAME)</command>
-               </action>
-
-               <action id="dist-build">
-                       <!-- Set up package directory -->
-                       <command>
-                               for d in config doc/refman/html 
doc/userman/html lib ; do \
-                                       mkdir -p $(PKGNAME)/$(DBLDOLLAR)d ; \
-                               done
-                       </command>
-
-                       <!-- Copy files into package directory -->
-                       <!-- top directory -->
-                       <command>
-                               cp Bakefiles.bkgen bootstrap ChangeLog cleanmf \
-                                       common.bkl config.guess config.h.in 
config.sub \
-                                       configure* COPYING CREDITS do-upload 
fetch-backup \
-                                       HACKERS INSTALL install.bat install-sh \
-                                       libmysqlclient.def LICENSE Makefile.* 
mysql++.* \
-                                       osver README* rebake reconf Wishlist 
$(PKGNAME)
-                       </command>
-
-                       <!-- config subdir -->
-                       <command>cp config/*.m4 $(PKGNAME)/config</command>
-
-                       <!-- doc subdir -->
-                       <command>
-                               cp doc/README* doc/*.pdf doc/ssqls-pretty 
$(PKGNAME)/doc
-                       </command>
-                       <command>
-                               for f in LICENSE Makefile mktxt README 
*.{xsl,xml} ; do \
-                                       cp doc/userman/$(DBLDOLLAR)f 
$(PKGNAME)/doc/userman ; \
-                               done
-                       </command>
-                       <command>
-                               for d in refman userman ; do \
-                                       for f in *.{css,html} ; do \
-                                               cp 
doc/$(DBLDOLLAR)d/html/$(DBLDOLLAR)f \
-                                                               
$(PKGNAME)/doc/$(DBLDOLLAR)d/html ; \
-                                       done ; \
-                               done ; \
-                               cp doc/refman/html/*.png 
$(PKGNAME)/doc/refman/html
-                       </command>
-
-                       <!-- lib subdir -->
-                       <command>
-                               cp lib/*.{bkl,cpp,ds?,h,in,pl} lib/Makefile.* 
$(PKGNAME)/lib
-                       </command>
-
-                       <!-- examples subdir -->
-                       <command>mkdir -p $(PKGNAME)/examples</command>
-                       <command>
-                               ( cd examples &amp;&amp; \
-                                 cp *.{bkl,cpp,ds?,h} exrun Makefile.* README \
-                                 ../$(PKGNAME)/examples )
-                       </command>
-               </action>
-
-               <action id="rpm-setup">
-                       <command>cp $(PKGNAME).tar.gz 
/usr/src/redhat/SOURCES</command>
-                       <depends>dist</depends>
-               </action>
-
-               <action id="rpm">
-                       <command>cd /usr/src/redhat/SPECS</command>
-                       <command>rpmbuild -bb mysql++.spec</command>
-                       <depends>rpm-setup</depends>
-               </action>
-
-               <action id="srpm">
-                       <command>cd /usr/src/redhat/SPECS</command>
-                       <command>rpmbuild -bs mysql++.spec</command>
-                       <depends>rpm-setup</depends>
-               </action>
-
-               <action id="ebuild">
-                       <depends>dist</depends>
-                       <command>cp $(PKGNAME).tar.gz 
/usr/portage/distfiles</command>
-                       <command>
-                               cp mysql++.ebuild 
/usr/portage/dev-db/mysql++/$(PKGNAME).ebuild
-                       </command>
-                       <command>
-                               ebuild 
/usr/portage/dev-db/mysql++/$(PKGNAME).ebuild digest
-                       </command>
+               <action id="lib/custom.h">
+                       <command>cd lib ; ./custom.pl</command>
+                       <depends-on-file>lib/custom.pl</depends-on-file>
+               </action>
+
+               <action id="lib/querydef.h">
+                       <command>cd lib ; ./querydef.pl</command>
+                       <depends-on-file>lib/querydef.pl</depends-on-file>
                </action>
 
                <action id="tags">
                        <is-phony/>
-                       <command>ctags `pwd`/{lib,examples}/*.{cpp,h}</command>
-                       <command>( cd lib ; ln -sf ../tags . )</command>
-                       <command>( cd examples ; ln -sf ../tags . )</command>
+                       <command>make tags</command>
                </action>
                <action id="ctags"><depends>tags</depends></action>
+
+               <action id="refman">
+                       <command>doxygen</command>
+                       <command>cd doc/refman/latex &amp;&amp; make pdf 
&amp;&amp; mv refman.pdf ../../mysqlpp-refman.pdf</command>
+               </action>
        </if>
 </makefile>

Modified: trunk/rebake
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/rebake?rev=1348&r1=1347&r2=1348&view=diff
==============================================================================
--- trunk/rebake (original)
+++ trunk/rebake Sat Jan  6 05:35:22 2007
@@ -2,7 +2,5 @@
 set -x
 bakefilize &&
        bakefile_gen $* &&
-       bakefile -f gnu -o examples/Makefile.simple examples/examples.bkl &&
-       unix2dos {examples,lib}/*.ds? &&
-       mv autoconf_inc.m4 config &&
-       rm -f {examples,lib}/autoconf_inc.m4 mysql++.dsw
+       unix2dos *.ds? &&
+       mv autoconf_inc.m4 config


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

Reply via email to