diff options
author | Russ Allbery <rra@stanford.edu> | 2008-08-26 21:15:15 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-08-26 22:36:36 -0700 |
commit | af77ec164a8637ed728735549cea64bc720d5d28 (patch) | |
tree | 4804dfec5662c78c9ec075053a91c9c930326bf8 | |
parent | 8813641dfef4d54223811e189e4abd68ff3e7b5c (diff) |
Java: add ant build machinery
Add an ant build.xml file generated with the proper release version via
configure and a local.properties file for it so that it can find the
Java source. Based on work by Marcus Watts.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | java/build.xml.in | 55 | ||||
-rw-r--r-- | java/local.properties.in | 2 |
5 files changed, 66 insertions, 1 deletions
@@ -13,6 +13,8 @@ config.log config.status configure docs/remctld.8.in +java/build.xml +java/local.properties libtool perl/Makefile.PL perl/Makefile.old @@ -92,3 +94,4 @@ tests/util/xwrite-t *.lo *.o *.pyc +*.tgz @@ -13,6 +13,11 @@ remctl 2.13 (unreleased) Include all *.class files in the JAR file built by java/Makefile, making the resulting JAR actually useful. Thanks, Marcus Watts. + Add an ant build configuration for the Java remctl implementation. + It also has the capability to generate a distribution of just the Java + implementation using a file layout more similar to an Apache Jakarta + project than the layout of the java subdirectory. + Several Windows fixes from Matthew Loar, plus really include portable/winsock.c in the distribution. This version should now build and run on Windows. diff --git a/configure.ac b/configure.ac index 6c9d24b..9b2abc9 100644 --- a/configure.ac +++ b/configure.ac @@ -130,7 +130,7 @@ AC_ARG_ENABLE([python], [AS_IF([test x"$enableval" = xyes], [build_python=yes])]) AM_CONDITIONAL([BUILD_PYTHON], [test x"$build_python" = xyes]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile java/build.xml java/local.properties]) AC_CONFIG_FILES([tests/client/pod-t], [chmod +x tests/client/pod-t]) AS_IF([test x"$build_perl" = xyes], [AC_CONFIG_FILES([perl/Makefile.PL perl/Remctl.pm])]) diff --git a/java/build.xml.in b/java/build.xml.in new file mode 100644 index 0000000..2b7ba48 --- /dev/null +++ b/java/build.xml.in @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project [ +]> +<project name="jremctl" default="all" basedir="."> + <property file="local.properties" /> + <property name="src" value="src" /> + <property name="bin" value="." /> + <property name="jar" value="remctl.jar" /> + <property name="tar" value="remctl.tgz" /> + <property name="release.number" value="@PACKAGE_VERSION@" /> + <property name="release.path" value="remctl-${release.number}" /> + <target name="prepare" depends="clean"> + <mkdir dir="${bin}" /> + </target> + <target name="clean"> + <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${bin}"> + <include name="**/*.class"/> + </fileset> + <fileset file="${jar}" /> + <fileset file="${tar}" /> + </delete> + </target> + <target name="compile" depends="prepare"> + <javac destdir="${bin}" + debug="true" + includes="**/*.java" excludes="t?.java" > + + <src path="${src}" /> + <compilerarg value="-Xlint:unchecked" /> + </javac> + </target> + <target name="jar" depends="compile"> + <jar jarfile="${jar}" compress="true" filesonly="true"> + <fileset dir="${bin}"> + <include name="**/*.class" /> + <exclude name="**/test/*.class" /> + </fileset> + </jar> + </target> + <target name="all" depends="jar"> + <echo message="done..." /> + </target> + <target name="tar"> + <tar destfile="${tar}" compression="gzip"> + <tarfileset dir="${src}" prefix="${release.path}/src"> + <include name="**/*.java" /> + </tarfileset> + <tarfileset dir="." prefix="${release.path}"> + <include name="**/build.xml" /> + </tarfileset> + <tarfileset file="${jar}" prefix="${release.path}/dist" /> + </tar> + </target> +</project> diff --git a/java/local.properties.in b/java/local.properties.in new file mode 100644 index 0000000..a976c5a --- /dev/null +++ b/java/local.properties.in @@ -0,0 +1,2 @@ +src=@abs_top_srcdir@/java +bin=bin |