[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] VS.NET build with apr-util and BDB

From: Tim Wharton \(PIL\) <tim_at_pineapple-interactive.com>
Date: 2005-05-13 19:26:25 CEST

This is a very simple patch that allows gen_make.py with
--enable-bdb-in-apr-util to function correctly on a Visual Studio 200X
build
using the -t vcproj option.

The w32locatedb.pl script in the apr-util distribution modifies header
files
and the VC6 project files, however the gen_make.py with the -t vcproj
option
doesn't replicate the changes made by w32locatedb.pl in the .vcproj
files.
Since w32locatedb.pl is still executed to modify the header files we
only
need to alter the .vcproj files.

I noticed there was a patch from 'Jon Foster' that partially addressed
this
issue but didn't appear to be resolved.
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=75898

My build command line is:
python gen-make.py -t vcproj --vsnet-version=2003
--with-berkeley-db=db4-win32
  --with-openssl=..\openssl-0.9.7d --with-zlib=..\zlib-1.2.2
--enable-nls
  --enable-bdb-in-apr-util --with-apr=..\apr --with-apr-util=..\apr-util
  --with-apr-icon=..\apr-iconv --with-libintl=..\svn-win32-libintl

Log message follows:

Allow Visual Studio .NET to build apr-util correctly with the
gen_make.py
--enable-bdb-in-apr-util switch.

* gen_win.py
  ( def write(self) ): Modified the calling of move_proj_file() for
  libaprutil.vcproj.ezt to pass an extra template parameter for the BDB
path
  based on if self.configure_apr_util is set or not.

* libaprutil.vcproj.ezt
  (VCCLCompilerTool.AdditionalIncludeDirectories Debug/Release):
  Added bdb include path if 'bdbpath' template variable is set.
  (VCCLCompilerTool.PreprocessorDefinitions Debug/Release):
  Define APU_USE_DB instead of APU_USE_SDBM if 'bdbpath' template
variable is
  set.
  (VCCLCompilerTool.AdditionalDependencies Debug/Release):
  Added libdb42d.lib in debug or libdb42.lib in release build if
'bdbpath'
  template variable is set.

PATCH FOLLOWS:

Index: build/generator/gen_vcnet_vcproj.py
===================================================================
--- build/generator/gen_vcnet_vcproj.py (revision 109)
+++ build/generator/gen_vcnet_vcproj.py (working copy)
@@ -104,7 +104,13 @@
                         'libapriconv_ccs_modules.vcproj')
     self.move_proj_file(os.path.join(self.apr_iconv_path,'ces'),
                         'libapriconv_ces_modules.vcproj')
- self.move_proj_file(self.apr_util_path, 'libaprutil.vcproj')
+
+ # if we're configuring apr-util with bdb, pass the appropriate path
to the template
+ if self.configure_apr_util:
+ self.move_proj_file(self.apr_util_path, 'libaprutil.vcproj',
(('bdbpath', os.path.abspath(self.bdb_path)),) )
+ else:
+ self.move_proj_file(self.apr_util_path, 'libaprutil.vcproj',
(('bdbpath', ''),) )
+
     self.move_proj_file(os.path.join(self.apr_util_path,'uri'),
                         'gen_uri_delims.vcproj')
     self.move_proj_file(os.path.join(self.apr_util_path,'xml', 'expat',
Index: build/generator/libaprutil.vcproj.ezt
===================================================================
--- build/generator/libaprutil.vcproj.ezt (revision 109)
+++ build/generator/libaprutil.vcproj.ezt (working copy)
@@ -20,8 +20,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-
AdditionalIncludeDirectories="./include,../apr/include,./include/private
,../apr-iconv/include,./dbm/sdbm,./xml/expat/lib"
-
PreprocessorDefinitions="_DEBUG;APU_DECLARE_EXPORT;APU_USE_SDBM;WIN32;_W
INDOWS"
+
AdditionalIncludeDirectories="./include,../apr/include,./include/private
,../apr-iconv/include,./dbm/sdbm,./xml/expat/lib[if-any
bdbpath],[bdbpath]/include[end]"
+
PreprocessorDefinitions="_DEBUG;APU_DECLARE_EXPORT;[if-any
bdbpath]APU_USE_DB[else]APU_USE_SDBM[end];WIN32;_WINDOWS"
                                RuntimeLibrary="3"
 
PrecompiledHeaderFile=".\Debug/libaprutil.pch"
                                AssemblerListingLocation=".\Debug/"
@@ -35,7 +35,7 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib
mswsock.lib"
+ AdditionalDependencies="ws2_32.lib
mswsock.lib[if-any bdbpath] [bdbpath]/lib/libdb42d.lib[end]"
                                OutputFile=".\Debug/libaprutil.dll"
                                LinkIncremental="1"
                                SuppressStartupBanner="TRUE"
@@ -77,8 +77,8 @@
                                Name="VCCLCompilerTool"
                                Optimization="2"
                                InlineFunctionExpansion="1"
-
AdditionalIncludeDirectories="./include,../apr/include,./include/private
,../apr-iconv/include,./dbm/sdbm,./xml/expat/lib"
-
PreprocessorDefinitions="NDEBUG;APU_DECLARE_EXPORT;APU_USE_SDBM;WIN32;_W
INDOWS"
+
AdditionalIncludeDirectories="./include,../apr/include,./include/private
,../apr-iconv/include,./dbm/sdbm,./xml/expat/lib[if-any
bdbpath],[bdbpath]/include[end]"
+
PreprocessorDefinitions="NDEBUG;APU_DECLARE_EXPORT;[if-any
bdbpath]APU_USE_DB[else]APU_USE_SDBM[end];WIN32;_WINDOWS"
                                StringPooling="TRUE"
                                RuntimeLibrary="2"
                                EnableFunctionLevelLinking="TRUE"
@@ -94,7 +94,7 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib
mswsock.lib"
+ AdditionalDependencies="ws2_32.lib
mswsock.lib[if-any bdbpath] [bdbpath]/lib/libdb42.lib[end]"
                                OutputFile=".\Release/libaprutil.dll"
                                LinkIncremental="1"
                                SuppressStartupBanner="TRUE"

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 13 21:41:05 2005

This is an archived mail posted to the Subversion Dev mailing list.