Author: wyoung
Date: Fri Jan 4 14:30:05 2008
New Revision: 2095
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2095&view=rev
Log:
- Created bootstrap.bat, and rewrote the "bootstrapping" section of
HACKERS.txt yet again to track this change.
- Changed rebake.bat to just be a wrapper around a simple bakefile_gen
call. It no longer limits itself to msvs2003prj partly because it
made it a third thing you had to change when you don't want this
platform, and partly because we need at least MinGW as well. Might as
well just generate them all, at that point.
- Renamed 'vstudio' bootstrap script option to 'bat', it being a wrapper
around bootstrap.bat now. Besides which, it isn't limited to VC++ any
more.
Added:
trunk/bootstrap.bat
Modified:
trunk/HACKERS.txt
trunk/README-Visual-C++.txt
trunk/bootstrap
trunk/rebake.bat
Modified: trunk/HACKERS.txt
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/HACKERS.txt?rev=2095&r1=2094&r2=2095&view=diff
==============================================================================
--- trunk/HACKERS.txt (original)
+++ trunk/HACKERS.txt Fri Jan 4 14:30:05 2008
@@ -20,49 +20,38 @@
Bootstrapping the Library
~~~~~~~~~~~~~~~~~~~~~~~~~
When you check out MySQL++ from svn, there are a lot of things
- "missing" as compared to a distributed tarball, because the svn
- repository doesn't contain any generated files.
-
- If you're on a Unixy platform, you can generate these files
- by running the 'bootstrap' script. You'll need autoconf 1.59,
- Bakefile 0.2.3, and Perl 5 installed on the system for bootstrap
- to run. There are more details about the boostrap script in a
- separate section below.
-
- On Windows, things are a bit harder because the bootstrap script
- (and its dependencies) are very Unix-centric, even though most
- of its outputs are not. Here are the files you need to generate
- to get MySQL++ to build on Windows:
-
- - Makefile.mingw, *.vcproj, *.sln:
-
- These are generated by Bakefile (http://bakefile.org/) from
- Bakefiles.bkgen and mysql++.bkl. MySQL++ currently requires
- Bakefile 0.2.3 or newer. Run rebake.bat to rebuild these files.
-
- As of this writing Bakefile 0.2.3 hasn't been released, so
- if you're not using Visual C++ 2003, you can change all the
- 'msvs2003prj' strings to 'msvs2005prj' in Bakefiles.bkgen,
- mysql++.bkl and rebake.bat to make it generate VC++ 2005
- compatible project files instead of VC++ 2003 project files.
- This will let you use Bakefile 0.2.2.
-
- - lib/mysql++.h:
-
- This file (and several others used on Unixy systems) is generated
- by autoconf. But, autoconf doesn't run natively on Windows.
- One way around this is to install Cygwin so you can run autoconf
- by hand. (As opposed to running it via bootstrap, which is more
- trouble than it's worth, on Windows.) Another is to install
- MySQL++ on a Linux box and let that system generate mysql++.h
- for you, then copy it over to the Windows box. mysql++.h.in
- (the source file for mysql++.h) doesn't change very often,
- so this shouldn't be a hardship.
-
- - lib/ssqls.h and lib/querydef.h:
-
- Run lib/ssqls.pl and lib/querydef.pl with a Perl interpreter
- to create these files.
+ "missing" as compared to a distributed tarball, because the
+ svn repository contains only source files, no generated files.
+
+ If you're using Windows, there is a simple batch file called
+ bootstrap.bat which wraps up all the steps you need to build
+ these "missing" files. To run it, just say "bootstrap" from a
+ command shell in the top MySQL++ source directory. For it to run
+ correctly, you will need Bakefile 0.2.3 (http://bakefile.org/) and
+ a Perl 5 interpreter installed on your system, both in the PATH.
+ The bootstrap script is smart enough to recognize when these
+ tools are missing and stop processing so you can fix the problem.
+
+ For all other platforms, there's a Bourne shell script called
+ bootstrap. It's quite a bit more complex than the bootstrap.bat
+ file. It does more, and takes many optional arguments to control
+ its behavior. All of this is documented in a separate section
+ below. For many systems, it suffices to just run it without
+ any arguments:
+
+ $ ./bootstrap
+
+ In addition to Bakefile 0.2.3 and Perl 5, you'll also need autoconf
+ 1.59 or higher for this to run successfully.
+
+ As of this writing Bakefile 0.2.3 hasn't been released. The only
+ reason we require it is for the new Visual C++ 2003 project
+ file support. If you're using Visual C++ 2005 or newer, or some
+ other system entirely, you can step back to the latest released
+ version, 0.2.2. You'll need to change all the 'msvs2003prj'
+ strings to 'msvs2005prj' in Bakefiles.bkgen and mysql++.bkl.
+ Also, change '0.2.3' to '0.2.2' at the top of mysql++.bkl.
+ These changes will allow the older version to process the Bakefile.
Submitting Patches
@@ -175,7 +164,7 @@
The bootstrap script also has other functions besides running
Bakefile and Autoconf for you:
- $ ./bootstrap [no{doc,ex,lib,opt}] [pedantic] [vstudio] \
+ $ ./bootstrap [no{doc,ex,lib,opt}] [pedantic] [bat] \
[configure flags]
Arguments:
@@ -201,16 +190,14 @@
Turns on all of GCC's warnings and portability checks.
Good for checking changes before making a public release.
- vstudio Builds only the Visual Studio project files. (That is, it
- runs rebake.bat for you.) This is useful when using
- Cygwin just as a command shell in preference to cmd.exe,
- as opposed to using Cygwin to build MySQL++ using its
- native tools. Passing 'vstudio' stops all command line
- processing in the bootstrap script, so if you also pass
- some of the other options, make 'vstudio' last. Not all
- of the above options are supported for Visual Studio,
- so don't be suprised if they have no effect on the built
- project files.
+ bat Asks cmd.exe to run bootstrap.bat for you. This is useful
+ when using Cygwin just as a command shell in preference
+ to cmd.exe, as opposed to using Cygwin to build MySQL++
+ using its native tools. Passing 'bat' stops all command
+ line processing in the bootstrap script, so if you
+ also pass some of the other options, make 'bat' last.
+ The only options that affect the built project files and
+ Makefiles work are the no* ones.
configure options
As soon as the bootstrap script sees an option that it
Modified: trunk/README-Visual-C++.txt
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/README-Visual-C%2B%2B.txt?rev=2095&r1=2094&r2=2095&view=diff
==============================================================================
--- trunk/README-Visual-C++.txt (original)
+++ trunk/README-Visual-C++.txt Fri Jan 4 14:30:05 2008
@@ -180,24 +180,22 @@
~~~~~~~~~~~~~~~~~~~~~
MySQL++'s Visual Studio project files aren't maintained directly.
Instead, we use a tool called Bakefile (http://bakefile.org/)
- to generate many different project file and Makefile types from
- a single set of source files. There is a native Win32 version of
+ to generate many different project file and Makefile types from a
+ single set of source files. There is a native Windows version of
Bakefile up on that web site. Download that and put the directory
containing bakefile.exe in your Windows PATH.
Bakefile generates the various project files and Makefiles from
a single source file, mysql++.bkl. This is usually the file you
need to change when you want to submit some change to the MySQL++
- build system. You might also look into the files Bakefiles.bkgen,
- rebake.bat and bootstrap; they're also involved in building the
- Visual C++ project files.
-
- Although Bakefile's documentation is lacking, it does at least
- list all the supported features. So, if you can't see a way
- to make Bakefile do something, it's likely it just can't do it.
- Bakefile is a high-level abstraction of build systems in general,
- so it'll never support all the particulars of every odd build
- system out there.
+ build system.
+
+ While Bakefile's documentation isn't as comprehensive as it
+ ought to be, you can at least count on it to list all of the
+ available features. So, if you can't see a way to make Bakefile
+ do something, it's likely it just can't do it. Bakefile is a
+ high-level abstraction of build systems in general, so it'll never
+ support all the particulars of every odd build system out there.
Once you've made your changes, you can generate the Visual C++
project files by running rebake.bat, which you can find in the
Modified: trunk/bootstrap
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/bootstrap?rev=2095&r1=2094&r2=2095&view=diff
==============================================================================
--- trunk/bootstrap (original)
+++ trunk/bootstrap Fri Jan 4 14:30:05 2008
@@ -5,6 +5,11 @@
while [ $ARGS != 0 ]
do
case "$1" in
+ bat)
+ cmd /c bootstrap.bat $BF_OPTIONS
+ exit 0
+ ;;
+
nodoc)
BF_OPTIONS="-DBUILDDOCS=no $BF_OPTIONS"
shift
@@ -28,11 +33,6 @@
pedantic)
export CXXFLAGS="-g -O2 -ansi -pedantic -Wall -W
-Wold-style-cast -Wfloat-equal -Wwrite-strings -Wno-overloaded-virtual
-Wno-long-long -Wno-variadic-macros -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
shift
- ;;
-
- vstudio)
- cmd /c rebake.bat $BF_OPTIONS
- exit 0
;;
*)
Added: trunk/bootstrap.bat
URL: http://svn.gna.org/viewcvs/mysqlpp/trunk/bootstrap.bat?rev=2095&view=auto
==============================================================================
--- trunk/bootstrap.bat (added)
+++ trunk/bootstrap.bat Fri Jan 4 14:30:05 2008
@@ -1,0 +1,57 @@
[EMAIL PROTECTED] off
+bakefile_gen %*
+if errorlevel 1 exit
+if not exist mysql++.sln goto no_bakefile
+
+cd lib
+perl querydef.pl
+if errorlevel 1 exit
+if not exist querydef.h goto no_perl
+perl ssqls.pl
+if errorlevel 1 exit
+if not exist ssqls.h goto no_perl
+
+if not exist mysql++.h goto no_mysqlpp_h
+cd ..
+
+exit
+
+:no_bakefile
+echo.
+echo Bakefile doesn't seem to be installed on this system. Download it
+echo from http://bakefile.org/ You need version 0.2.3 or newer.
+echo.
+exit
+
+:no_perl
+echo.
+echo You need a Perl interpreter installed on your system, somewhere in
+echo the PATH. Any recent version or flavor should work; we don't use
+echo any special extensions. The easiest to install on Windows would be
+echo ActivePerl, from http://activestate.com/Products/activeperl/
+echo If you're familiar with Unix, you might like Cygwin better instead:
+echo http://cygwin.com/setup.exe
+echo.
+cd ..
+exit
+
+:no_mysqlpp_h
+echo.
+echo WARNING: Can't make lib/mysql++.h
+echo.
+echo On Unixy systems, autoconf creates lib/mysql++.h from lib/mysql++.h.in
+echo but there is no easy way to do this on Windows. You can do it manually:
+echo just copy the file to the new name, and edit the MYSQLPP_HEADER_VERSION
+echo definition to put the proper version number parts into the macro. It
+echo needs to look something like this:
+echo.
+echo #define MYSQLPP_HEADER_VERSION MYSQLPP_VERSION(3, 0, 0)
+echo.
+echo It's important that the three numbers match the actual library version
+echo number, or else programs that check this (like resetdb) will fail.
+echo.
+echo Alternately, if you've also got MySQL++ installed on some Unixy type
+echo system, you can let its bootstrap procedure create mysql++.h and then
+echo copy it to the Windows machine.
+echo.
+cd ..
Modified: trunk/rebake.bat
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/rebake.bat?rev=2095&r1=2094&r2=2095&view=diff
==============================================================================
--- trunk/rebake.bat (original)
+++ trunk/rebake.bat Fri Jan 4 14:30:05 2008
@@ -1,2 +1,2 @@
@echo on
-bakefile_gen -f msvs2003prj %* && start mysql++.sln
+bakefile_gen %*
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits