complete sqlpp build-script
Tomasz Dreßler <[email protected]> Mon, 19 Apr 2004 18:33:07 +0200
| Newsgroups | gmane.comp.lib.sql.sqlpp |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------000902020601040406080407
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi!
I finshed the build-script :)
With the build.xml you can build the SQLpp.exe without using VS.NET.
dal.xml contain targets I used to execute sql-querys and
build dal.dll from *.cs files.
Place the scripts in same file hierarchy as iobind and sqlpp folder
and enter 'nant -f:build.xml'
Feel free to use and modifiy my scripts.
Tomek
--------------000902020601040406080407
Content-Type: text/xml;
name="build.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="build.xml"
<?xml version="1.0"?>
<project name="SQLPP" default="bulid" basedir=".">
<property name="debug" value="true"/>
<property name="boost.dir" value="E:\boost\boost-1.30.2"/>
<property name="compileOptions" value="/Od /I "${boost.dir}"
/I "." /I ".." /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS"
/Gm /EHsc /RTC1 /MDd /W3 /c /ZI /TP" />
<property name="likerOptions" value="/INCREMENTAL /NOLOGO
/LIBPATH:"sqlpp/SQLpp/lib" /LIBPATH:"iobind/lib"
/NODEFAULTLIB:"libcd.lib" /DEBUG /PDB:"sqlpp\SQLpp\bin\SQLpp.pdb"
/SUBSYSTEM:CONSOLE /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib " />
<target name="mkdir">
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\xml" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\adaptors" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\core" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\expressions" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\generators" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\parsers" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\properties" />
<mkdir dir="sqlpp\SQLpp\lib_sqlpp\Debug\queries" />
</target>
<target name="lib_iobind">
<cl outputdir="iobind\iobind\Debug" options="${compileOptions}" debug="${debug}">
<sources basedir="iobind\iobind" >
<includes name="src\**.cpp" />
</sources>
<includedirs>
<includes name="iobind" />
<includes name="iobind\iobind" />
</includedirs>
</cl>
<lib output="iobind\lib\lib_iobindd.lib">
<sources basedir="iobind\iobind\Debug" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_xml">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\xml" options="${compileOptions}" debug="${debug}">
<sources>
<includes name="sqlpp\SQLpp\src\xml\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_xmld.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\xml" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_adaptors">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\adaptors" options="${compileOptions}" debug="${debug}">
<sources >
<includes name="sqlpp\SQLpp\src\adaptors\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_adaptorsd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\adaptors" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_core">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\core" options="${compileOptions}" debug="${debug}">
<sources>
<includes name="sqlpp\SQLpp\src\*.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_cored.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\core" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_expressions">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\expressions" options="${compileOptions}" debug="${debug}">
<sources basedir="" >
<includes name="sqlpp\SQLpp\src\expressions\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_expressionsd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\expressions" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_generators">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\generators" options="${compileOptions}" debug="${debug}">
<sources>
<includes name="sqlpp\SQLpp\src\generators\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_generatorsd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\generators" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_parsers">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\parsers" options="${compileOptions}" debug="${debug}">
<sources>
<includes name="sqlpp\SQLpp\src\parsers\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_parsersd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\parsers" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_properties">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\properties" options="${compileOptions}" debug="${debug}">
<sources>
<includes name="sqlpp\SQLpp\src\properties\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_propertiesd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\properties" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="lib_sqlpp_queries">
<cl outputdir="sqlpp\SQLpp\lib_sqlpp\Debug\queries" options="${compileOptions}" debug="${debug}">
<sources >
<includes name="sqlpp\SQLpp\src\queries\**.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
</cl>
<lib output="sqlpp\SQLpp\lib\lib_sqlpp_queriesd.lib">
<sources basedir="sqlpp\SQLpp\lib_sqlpp\Debug\queries" >
<includes name="*.obj" />
</sources>
</lib>
</target>
<target name="wiki_generator">
<cl outputdir="sqlpp\SQLpp\Debug\" options="${compileOptions}" debug="${debug}">
<sources basedir="sqlpp\SQLpp">
<includes name=".\gunit_report.cpp" />
<includes name=".\gunit_report_sp.cpp" />
<includes name=".\itrace_generator.cpp" />
<includes name=".\itrace_tables.cpp" />
<includes name=".\main.cpp" />
<includes name=".\wiki_generator.cpp" />
</sources>
<includedirs>
<includes name="iobind\iobind" />
<includes name="sqlpp\SQLpp" />
<includes name="sqlpp\SQLpp\**" />
</includedirs>
<lib output="sqlpp\SQLpp\lib\wiki_generator.lib">
<sources basedir="sqlpp\SQLpp\Debug" >
<includes name="*.obj" />
</sources>
</lib>
</cl>
</target>
<target name="needed_projects" depends="lib_iobind, lib_sqlpp_xml, lib_sqlpp_adaptors, lib_sqlpp_core,
lib_sqlpp_expressions, lib_sqlpp_generators,lib_sqlpp_parsers,lib_sqlpp_properties,lib_sqlpp_queries, wiki_generator">
<echo message="done" debug="${debug}" />
</target>
<target name="link" debug="${debug}">
<link output="sqlpp\SQLpp\bin\SQLpp.exe" options="${likerOptions}">
<sources>
<includes name="iobind\lib\lib_iobindd.lib" />
<includes name="sqlpp\SQLpp\lib\*.lib" />
<includes name="sqlpp\SQLpp\debug\*.obj" />
</sources>
</link>
</target>
<!-- bulid SQLpp.exe -->
<target name="bulid" depends="mkdir,needed_projects,link">
<echo message="SQLpp.exe created!" debug="${debug}" />
</target>
</project>
--------------000902020601040406080407
Content-Type: text/xml;
name="dal.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="dal.xml"
<?xml version="1.0"?>
<project name="DAL" default="bulid" basedir=".">
<property name="dal.dir" value="EarNet" />
<property name="lib.dir" value="lib" />
<property name="assemby.dir" value="ear2004\lib" />
<property name="assembly.filename" value="EarNet" />
<property name="graphviz.dir" value="Graphviz\bin" />
<property name="osql.parameter" value=" -E -d ear2004 -i" />
<property name="sql.dir" value="${dal.dir}\Data\Providers" />
<!-- delete dal code -->
<target name="cleanDalCode">
<delete dir="${dal.dir}" failonerror="false"/>
</target>
<!-- delete Assembly -->
<target name="cleanAssembly">
<delete>
<fileset>
<includes name="${assembly.dir}/${assembly.filename}.*" failonerror="false"/>
</fileset>
</delete>
</target>
<!-- create DAL Code -->
<target name="createDALCode" depends="cleanDalCode,cleanAssembly" >
<exec program="sqlpp/SQLpp/bin/SQLpp.exe"/>
</target>
<!-- Assembly erzeugen und plazieren -->
<target name="createAssemby" depends="createDALCode">
<csc target="library" output="${assemby.dir}/${assembly.filename}.dll" debug="${debug}">
<references basedir="${lib.dir}" >
<includes name="*.dll" />
</references>
<sources basedir="${dal.dir}">
<includes name="Config/DataProviderConfigurationHandler.cs" />
<includes name="Data/Providers/*.cs" />
<includes name="Data/*.cs" />
</sources>
</csc>
</target>
<!-- print dot picture -->
<target name="graphviz">
<exec program="${graphviz.dir}/dot.exe" basedir="."
commandline="-Tpng -o ${dal.dir}/dbshema.png ${dal.dir}/dbshema.dot" />
</target>
<!-- start generate DAL code-->
<target name="sqlpp" depends="createAssemby">
<echo message="done" debug="${debug}" />
</target>
<!-- SQL -->
<target name="msql" >
<foreach item="File" in="${sql.dir}" property="filename">
<in>
<items>
<includes name="**\*.sql" />
</items>
</in>
<do>
<echo message="found ${filename}" />
<!-- <exec program="osql" workingdir="${sql.dir}" commandline="${osql.parameter} ${filename}"/> -->
</do>
</foreach>
</target>
<target name="cleanDb">
<exec program="osql" workingdir="${sql.dir}" commandline="-E -Q "drop database ear2004""/>
<exec program="osql" workingdir="${sql.dir}" commandline="-E -Q "create database ear2004 ""/>
</target>
</project>
--------------000902020601040406080407--
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click