You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/06/03 22:33:32 UTC
svn commit: r781532 - in /activemq/activemq-cpp/trunk/activemq-cpp: build.sh
pom.xml
Author: tabish
Date: Wed Jun 3 20:33:31 2009
New Revision: 781532
URL: http://svn.apache.org/viewvc?rev=781532&view=rev
Log:
Updates the build script and creates new maven executions for building, testing and cleaning the code.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/build.sh
activemq/activemq-cpp/trunk/activemq-cpp/pom.xml
Modified: activemq/activemq-cpp/trunk/activemq-cpp/build.sh
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/build.sh?rev=781532&r1=781531&r2=781532&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/build.sh (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/build.sh Wed Jun 3 20:33:31 2009
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# ------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -16,63 +16,83 @@
# limitations under the License.
# ------------------------------------------------------------------------
-# default settings
-runautogen=true
-runconfigure=true
-maketarget=all
-
# load the user supplied build configuration file if present.
if [ -f "./build.conf" ] ; then
. ./build.conf
fi
-# No Configure script means we have to run autogen, which in turn means
-# we need to run a new Configure on the project.
-if [ -x "./configure" ] ; then
-
- # even if we have a configure script, if the template has been updated we should
- # run it again to account for the changes, which also means we need to run a autogen
- # to create the actual script and associated autoconf artifacts.
- if [ "./configure.ac" -ot "./configure" ] ; then
- echo "No need to run autogen.sh or configure"
- runautgen=false
- runconfigure=false
- else
- echo "We need to run autogen.sh and configure"
- runautgen=true
- runconfigure=true
- fi
+# load user activemq-cpp build configuration
+if [ -f "$HOME/.activemqcpprc" ] ; then
+ . "$HOME/.activemqcpprc"
+fi
+# This is where we run all the build steps, configure, make, etc.
+if [ -n builddir ] ; then
+ builddir="./build"
fi
-run_Configure {
- autogen.sh
- pushd build
+check_Configure() {
+
+ # No Configure script means we have to run autogen, which in turn means
+ # we need to run a new Configure on the project.
+ if [ -x "./configure" ] ; then
+
+ # even if we have a configure script, if the template has been updated we should
+ # run it again to account for the changes, which also means we need to run a autogen
+ # to create the actual script and associated autoconf artifacts.
+ if [ "./configure.ac" -ot "./configure" ] && [ -d $builddir ] ; then
+ runconfigure=false
+ else
+ runconfigure=true
+ fi
+
+ fi
+
+ if [ "true" = $runconfigure ] ; then
+ run_Configure
+ fi
+
+}
+
+run_Configure() {
+ ./autogen.sh
+
+ if ! [ -d $builddir ] ; then
+ mkdir -p $builddir
+ fi
+
+ pushd $builddir
../configure
+ popd
exit
}
run_Clean() {
- pushd build
- make clean
+ rm -rf $builddir
exit
}
run_Make() {
- pushd build
+ check_Configure
+ pushd $builddir
make
+ popd
exit
}
run_Check() {
- pushd build
+ check_Configure
+ pushd $builddir
make check
+ popd
exit
}
run_Doxygen() {
- pushd build
+ check_Configure
+ pushd $builddir
make doxygen-run
+ popd
exit
}
@@ -80,10 +100,10 @@
configure)
run_Configure
;;
-all)
+compile)
run_Make
;;
-check)
+test)
run_Check
;;
clean)
@@ -93,7 +113,7 @@
run_Doxygen
;;
*)
- echo "Usage: $0 {clean}"
+ echo "Usage: $0 {configure,compile,clean,test,doxygen}"
exit 1
esac
Modified: activemq/activemq-cpp/trunk/activemq-cpp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/pom.xml?rev=781532&r1=781531&r2=781532&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/pom.xml (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/pom.xml Wed Jun 3 20:33:31 2009
@@ -198,7 +198,7 @@
</plugin>
</plugins>
</build>
- <!--
+
<profiles>
<profile>
<id>Unix Make</id>
@@ -215,18 +215,57 @@
<version>1.1</version>
<executions>
<execution>
+ <id>Configure</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>configure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Compile</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
+ <configuration>
+ <arguments>
+ <argument>compile</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>test</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Clean</id>
+ <phase>test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>clean</argument>
+ </arguments>
+ </configuration>
</execution>
</executions>
<configuration>
- <executable>make</executable>
- <workingDirectory>${basedir}/build</workingDirectory>
- <arguments>
- <argument>check</argument>
- </arguments>
+ <executable>build.sh</executable>
+ <workingDirectory>${basedir}</workingDirectory>
</configuration>
</plugin>
</plugins>
@@ -265,5 +304,5 @@
</build>
</profile>
</profiles>
- -->
+
</project>