You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2008/02/12 22:27:07 UTC
svn commit: r627119 - in /logging/log4cxx/trunk: build.xml pom.xml
src/ant/apr-build.xml src/ant/apr-util-build.xml src/ant/common.xml
src/assembly/source.xml src/site/site.xml
Author: carnold
Date: Tue Feb 12 13:27:06 2008
New Revision: 627119
URL: http://svn.apache.org/viewvc?rev=627119&view=rev
Log:
LOGCXX-62: Improve IDE projects, Maven build
Modified:
logging/log4cxx/trunk/build.xml
logging/log4cxx/trunk/pom.xml
logging/log4cxx/trunk/src/ant/apr-build.xml
logging/log4cxx/trunk/src/ant/apr-util-build.xml
logging/log4cxx/trunk/src/ant/common.xml
logging/log4cxx/trunk/src/assembly/source.xml
logging/log4cxx/trunk/src/site/site.xml
Modified: logging/log4cxx/trunk/build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/build.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/build.xml (original)
+++ logging/log4cxx/trunk/build.xml Tue Feb 12 13:27:06 2008
@@ -21,7 +21,7 @@
<libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}" dir="${apr-util.lib.dir}" if="apr-util.lib.dir"/>
<libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}" unless="apr-util.lib.dir"/>
<libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}" dir="${apr.lib.dir}" if="apr.lib.dir"/>
- <libset libs="${apr.lib.prefix}${apr.lib.name}${spr.lib.suffix}" unless="apr.lib.dir"/>
+ <libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}" unless="apr.lib.dir"/>
<libset libs="esmtp" if="has-libesmtp"/>
<libset libs="${odbc.lib}" if="odbc.lib"/>
<libset libs="${apr-util.dependencies}" if="apr-util.dependencies"/>
@@ -69,7 +69,6 @@
<property name="src.dir" location="${base.dir}/src/main/cpp"/>
<property name="include.dir" location="${base.dir}/src/main/include"/>
<property name="target.dir" location="${base.dir}/target"/>
-<property name="projects.dir" location="${target.dir}"/>
<property name="lib.dir" location="${target.dir}/lib"/>
<property name="examples.dir" location="${base.dir}/src/examples/cpp"/>
<property name="tests.dir" location="${base.dir}/src/test"/>
@@ -78,6 +77,9 @@
<property name="tests.output.dir" location="${tests.resources.dir}/output"/>
<property name="m2_repo" location="${user.home}/.m2/repository"/>
<property name="log4j.version" value="1.2.15"/>
+<available property="log4j.jar"
+ value="/usr/share/java/log4j-1.2.jar"
+ file="/usr/share/java/log4j-1.2.jar"/>
<property name="log4j.jar"
location="${m2_repo}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"/>
@@ -184,6 +186,11 @@
<isset property="odbc.lib"/>
</condition>
<property name="has-ODBC" value="0"/>
+
+ <condition property="force-ant" value="1">
+ <equals arg1="${find}" arg2="false"/>
+ </condition>
+ <echo>force-ant: ${force-ant}</echo>
</target>
@@ -336,6 +343,7 @@
<param name="file" value="${include.dir}/log4cxx/private/log4cxx_private.tmp"/>
</antcall>
<delete file="${include.dir}/log4cxx/private/log4cxx_private.tmp"/>
+
</target>
@@ -494,9 +502,6 @@
<fail unless="apr-libs-match">apr is ${apr.lib.type} and apr-util is ${apr-util.lib.type}, must be same type.</fail>
<property name="lib.name" value="log4cxx"/>
<property name="lib.prefix" value=""/>
- <condition property="lib.suffix" value="d">
- <istrue value="${debug}"/>
- </condition>
<property name="lib.suffix" value=""/>
<condition property="apr-util.dependencies" value="expat iconv">
@@ -506,6 +511,7 @@
<property name="project.compiler" value="${compiler}"/>
<property name="project.type" value="msvc6"/>
+
<cc name="${project.compiler}"
exceptions="true"
outfile="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}"
@@ -657,7 +663,6 @@
<compilerarg value="${pic-option}" if="pic-option"/>
<libset libs="${lib.prefix}${lib.name}${lib.suffix}" dir="${log4cxx.lib.dir}"/>
- <libset libs="dl" if="is-unix"/>
&libsets;
<project outfile="${projects.dir}/testsuite" type="${project.type}" if="project.if">
@@ -893,22 +898,28 @@
<param name="project.if" value="true"/>
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
<param name="os.family" value="${os.family}"/>
+ <param name="find" value="${find}"/>
</antcall>
<antcall target="build-standalone-unittest">
<param name="project.if" value="true"/>
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
<param name="os.family" value="${os.family}"/>
+ <param name="find" value="${find}"/>
</antcall>
<antcall target="build-examples">
<param name="project.if" value="true"/>
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
<param name="os.family" value="${os.family}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -918,6 +929,8 @@
<param name="project.type" value="msvc6"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -927,6 +940,8 @@
<param name="project.type" value="msvc7"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -935,7 +950,9 @@
<antcall target="build-projects">
<param name="project.type" value="msvc8"/>
<param name="project.compiler" value="msvc"/>
- <param name="os.family" value="windows"/>
+ <param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -946,6 +963,8 @@
<param name="project.type" value="msvc9"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -955,6 +974,8 @@
<param name="project.type" value="xcode"/>
<param name="project.compiler" value="g++"/>
<param name="os.family" value="mac"/>
+ <param name="debug" value="${debug}"/>
+ <param name="find" value="${find}"/>
</antcall>
</target>
@@ -973,6 +994,7 @@
</target>
+
<target name="apidocs" depends="init" description="Build log4cxx manual">
<copy file="src/site/doxy/Doxyfile.in" tofile="${target.dir}/Doxyfile"
overwrite="true"/>
@@ -984,6 +1006,75 @@
</replace>
<mkdir dir="target/site/apidocs"/>
<exec executable="${doxygen.exe}" dir="${target.dir}"/>
+</target>
+
+<target name="patch-vc6-log4cxx">
+ <exec executable="sed">
+ <arg value="-i"/>
+ <arg value="-e"/>
+ <arg value="s~ADD LINK32 .*/NOLOGO~ADD LINK32 static\\aprutil-1.lib static\\apr-1.lib ADVAPI32.LIB MSWSOCK.LIB WS2_32.LIB SHELL32.LIB ODBC32.LIB /NOLOGO~g"/>
+ <arg value="${project.dsp}"/>
+ </exec>
+</target>
+
+<target name="patch-vc6-sample">
+ <exec executable="sed">
+ <arg value="-i"/>
+ <arg value="-e"/>
+ <arg value="s~ADD LINK32 .*/NOLOGO~ADD LINK32 shared\\log4cxx.lib static\\aprutil-1.lib static\\apr-1.lib ADVAPI32.LIB MSWSOCK.LIB WS2_32.LIB SHELL32.LIB ODBC32.LIB /NOLOGO~g"/>
+ <arg value="${project.dsp}"/>
+ </exec>
+</target>
+
+<target name="patch-vc7-log4cxx">
+ <exec executable="sed">
+ <arg value="-i"/>
+ <arg value=".bak"/>
+ <arg value="-e"/>
+ <arg value='s~AdditionalDependencies=".*"~~'/>
+ <arg value="-e"/>
+ <arg value='s~Name="VCLinkerTool"~Name="VCLinkerTool" AdditionalDependencies="static\\aprutil-1.lib static\\apr-1.lib ADVAPI32.LIB MSWSOCK.LIB WS2_32.LIB SHELL32.LIB ODBC32.LIB"~'/>
+ <arg value="${project.dsp}"/>
+ </exec>
+</target>
+
+<target name="patch-vc7-sample">
+ <exec executable="sed">
+ <arg value="-i"/>
+ <arg value=".bak"/>
+ <arg value="-e"/>
+ <arg value='s~AdditionalDependencies=".*"~~'/>
+ <arg value="-e"/>
+ <arg value='s~Name="VCLinkerTool"~Name="VCLinkerTool" AdditionalDependencies="shared\\log4cxx.lib static\\aprutil-1.lib static\\apr-1.lib ADVAPI32.LIB MSWSOCK.LIB WS2_32.LIB SHELL32.LIB ODBC32.LIB"~'/>
+ <arg value="${project.dsp}"/>
+ </exec>
+</target>
+
+
+<target name="site" depends="apidocs">
+ <!-- generate Visual Studio and XCode project files -->
+ <antcall target="build-projects-vc6">
+ <param name="find" value="false"/>
+ </antcall>
+ <antcall target="build-projects-vc7">
+ <param name="find" value="false"/>
+ </antcall>
+ <antcall target="build-projects-xcode"/>
+ <taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" />
+
+ <foreach target="patch-vc6-sample" param="project.dsp">
+ <path><fileset dir="${target.dir}" includes="**/*.dsp"/></path>
+ </foreach>
+ <foreach target="patch-vc6-log4cxx" param="project.dsp">
+ <path><fileset dir="${target.dir}" includes="**/log4cxx.dsp **/testsuite-standalone.dsp"/></path>
+ </foreach>
+ <foreach target="patch-vc7-sample" param="project.dsp">
+ <path><fileset dir="${target.dir}" includes="**/*.vcproj"/></path>
+ </foreach>
+ <foreach target="patch-vc7-log4cxx" param="project.dsp">
+ <path><fileset dir="${target.dir}" includes="**/log4cxx.vcproj **/testsuite-standalone.vcproj"/></path>
+ </foreach>
+
</target>
<target name="gump" depends="check, header-check"/>
Modified: logging/log4cxx/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/pom.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/pom.xml (original)
+++ logging/log4cxx/trunk/pom.xml Tue Feb 12 13:27:06 2008
@@ -116,7 +116,7 @@
<id>site</id>
<configuration>
<tasks>
- <ant target="apidocs"/>
+ <ant target="site"/>
<taskdef name="replaceregexp" classname="org.apache.tools.ant.taskdefs.optional.ReplaceRegExp" />
<replaceregexp file="target/site/source-repository.html" match="/tags/[^ "'<]*" replace="/trunk" flags="g"/>
<replaceregexp match="Generated on .* for " replace="Generated for " flags="g">
@@ -167,7 +167,7 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>cpptasks</artifactId>
- <version>1.0b3</version>
+ <version>1.0b5-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
@@ -198,12 +198,6 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: logging/log4cxx/trunk/src/ant/apr-build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/apr-build.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/apr-build.xml (original)
+++ logging/log4cxx/trunk/src/ant/apr-build.xml Tue Feb 12 13:27:06 2008
@@ -51,7 +51,6 @@
<property name="test.dir" location="${src.dir}/test"/>
<property name="target.dir" location="${basedir}/target"/>
<property name="lib.type" value="shared"/>
-<property name="projects.dir" location="${target.dir}"/>
<property name="lib.name" value="apr-1"/>
<property name="lib.prefix" value=""/>
@@ -100,6 +99,7 @@
<mkdir dir="${executable.dir}/apr-ofiles"/>
<property name="project.compiler" value="${compiler}"/>
<property name="project.type" value="msvc6"/>
+
<cc name="${project.compiler}"
outfile="${executable.dir}/${lib.prefix}${lib.name}${lib.suffix}"
subsystem="console"
@@ -412,6 +412,7 @@
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
<param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
<param name="arch" value="${arch}"/>
</antcall>
@@ -420,6 +421,7 @@
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
<param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
<param name="arch" value="${arch}"/>
</antcall>
@@ -431,6 +433,8 @@
<param name="project.type" value="msvc6"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="projects.dir" value="${projects.dir}"/>
</antcall>
</target>
@@ -441,6 +445,8 @@
<param name="project.type" value="msvc7"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="projects.dir" value="${projects.dir}"/>
</antcall>
</target>
@@ -450,6 +456,8 @@
<param name="project.type" value="msvc8"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="projects.dir" value="${projects.dir}"/>
</antcall>
</target>
@@ -459,6 +467,8 @@
<param name="project.type" value="msvc9"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="debug" value="${debug}"/>
+ <param name="projects.dir" value="${projects.dir}"/>
</antcall>
</target>
@@ -468,6 +478,8 @@
<param name="project.type" value="xcode"/>
<param name="project.compiler" value="${compiler}"/>
<param name="os.family" value="mac"/>
+ <param name="debug" value="${debug}"/>
+ <param name="projects.dir" value="${projects.dir}"/>
</antcall>
</target>
Modified: logging/log4cxx/trunk/src/ant/apr-util-build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/apr-util-build.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/apr-util-build.xml (original)
+++ logging/log4cxx/trunk/src/ant/apr-util-build.xml Tue Feb 12 13:27:06 2008
@@ -52,7 +52,6 @@
<property name="src.dir" location="${basedir}"/>
<property name="include.dir" location="${src.dir}/include"/>
<property name="target.dir" location="${basedir}/target"/>
-<property name="projects.dir" location="${target.dir}"/>
<target name="usage" description="Displays usage notes">
@@ -318,6 +317,7 @@
<param name="project.type" value="${project.type}"/>
<param name="project.compiler" value="${project.compiler}"/>
<param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
<param name="projectsOnly" value="true"/>
</antcall>
</target>
@@ -328,7 +328,9 @@
<param name="projects.dir" value="${projects.dir}"/>
<param name="project.type" value="msvc6"/>
<param name="project.compiler" value="msvc"/>
- <param name="os.family" value="windows"/>
+ <param name="os.family" value="windows"/>
+ <param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
</antcall>
</target>
@@ -339,6 +341,8 @@
<param name="project.type" value="msvc7"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
</antcall>
</target>
@@ -349,6 +353,8 @@
<param name="project.type" value="msvc8"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
</antcall>
</target>
@@ -359,6 +365,8 @@
<param name="project.type" value="msvc9"/>
<param name="project.compiler" value="msvc"/>
<param name="os.family" value="windows"/>
+ <param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
</antcall>
</target>
@@ -368,7 +376,9 @@
<param name="projects.dir" value="${projects.dir}"/>
<param name="project.type" value="xcode"/>
<param name="project.compiler" value="${compiler}"/>
- <param name="os.family" value="mac"/>
+ <param name="os.family" value="mac"/>
+ <param name="projects.dir" value="${projects.dir}"/>
+ <param name="debug" value="${debug}"/>
</antcall>
</target>
Modified: logging/log4cxx/trunk/src/ant/common.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/common.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/common.xml (original)
+++ logging/log4cxx/trunk/src/ant/common.xml Tue Feb 12 13:27:06 2008
@@ -17,7 +17,7 @@
-->
<property file="build.properties"/>
-<property name="debug" value="true"/>
+<property name="debug" value="false"/>
<property name="rtti" value="false"/>
<property name="optimize" value="none"/>
<property name="lib.type" value="shared"/>
@@ -85,7 +85,7 @@
<available classname="net.sf.antcontrib.cpptasks.CCTask" property="cctask-available"/>
<fail unless="cctask-available">cpptasks required
-Use CVS HEAD or Feb 2005 or later release from
+Use cpptasks 1.0b5 or later from
http://ant-contrib.sourceforge.net.
</fail>
@@ -96,6 +96,7 @@
Required features not present in cpptasks releases prior to Feb 2005</fail -->
<mkdir dir="${target.dir}"/>
+ <property name="projects.dir" value="${target.dir}"/>
<mkdir dir="${projects.dir}"/>
<condition property="is-gcc" value="true">
Modified: logging/log4cxx/trunk/src/assembly/source.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/assembly/source.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/assembly/source.xml (original)
+++ logging/log4cxx/trunk/src/assembly/source.xml Tue Feb 12 13:27:06 2008
@@ -26,17 +26,54 @@
<fileSets>
<fileSet>
<includes>
- <include>*.sh</include>
- <include>*.in</include>
- <include>*.m4</include>
- <include>*.xml</include>
<include>INSTALL</include>
<include>KEYS</include>
<include>LICENSE</include>
+ <include>Makefile.am</include>
<include>NOTICE</include>
- <include>src/**</include>
- <exclude>src/test/resources/output</exclude>
- </includes>
+ <include>autogen.sh</include>
+ <include>build.xml</include>
+ <include>configure.in</include>
+ <include>find_apr.m4</include>
+ <include>find_apu.m4</include>
+ <include>liblog4cxx.pc.in</include>
+ <include>pom.xml</include>
+ <include>src/**</include>
+ </includes>
+ <excludes>
+ <exclude>src/main/include/log4cxx/log4cxx.h</exclude>
+ <exclude>src/main/include/log4cxx/private/log4cxx_private.h</exclude>
+ <exclude>src/test/cpp/testsuite</exclude>
+ <exclude>src/examples/cpp/console</exclude>
+ <exclude>src/examples/cpp/delayedloop</exclude>
+ <exclude>src/examples/cpp/stream</exclude>
+ <exclude>src/examples/cpp/trivial</exclude>
+ <exclude>**/Makefile</exclude>
+ <exclude>**/Makefile.in</exclude>
+ <exclude>**/*.o</exclude>
+ <exclude>**/*.Po</exclude>
+ <exclude>**/*.lo</exclude>
+ <exclude>**/*.a</exclude>
+ <exclude>**/*.la</exclude>
+ <exclude>**/*.so</exclude>
+ <exclude>**/*.dylib</exclude>
+ <exclude>**/*.dll</exclude>
+ <exclude>**/Doxyfile</exclude>
+ <exclude>src/test/resources/output/**</exclude>
+ <exclude>**/.libs/**</exclude>
+ <exclude>**/.deps/**</exclude>
+ <exclude>**/.svn</exclude>
+ </excludes>
</fileSet>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory>projects</outputDirectory>
+ <includes>
+ <include>*.dsw</include>
+ <include>*.dsp</include>
+ <include>*.vsproj</include>
+ <include>*.xcodeproj/**</include>
+ </includes>
+ </fileSet>
</fileSets>
</assembly>
Modified: logging/log4cxx/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/site/site.xml?rev=627119&r1=627118&r2=627119&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/site/site.xml (original)
+++ logging/log4cxx/trunk/src/site/site.xml Tue Feb 12 13:27:06 2008
@@ -48,6 +48,14 @@
<menu name="Development">
<item name="Repository" href="/source-repository.html"/>
</menu>
+
+ <menu name="Building">
+ <item name="autotools" href="/building/autotools.html"/>
+ <item name="Apache Ant" href="/building/ant.html"/>
+ <item name="Apache Maven 2" href="/building/maven.html"/>
+ <item name="Microsoft Visual Studio" href="/building/vstudio.html"/>
+ <item name="Apple Xcode" href="/building/xcode.html"/>
+ </menu>
<menu name="Documentation">
<item name="Introduction" href="/manual.html"/>