summaryrefslogtreecommitdiff
path: root/contrib/retep
diff options
context:
space:
mode:
authorPeter Eisentraut2001-07-06 23:07:20 +0000
committerPeter Eisentraut2001-07-06 23:07:20 +0000
commitaf3ce5daa4536fb015bced3642ba3d052df95b0f (patch)
treed8d1073b4f3bca11176a686b761a7e4b06c24005 /contrib/retep
parent55432fedd2b3383c0cd0724a70ad0ae5134710f3 (diff)
Resolve a number of oddities in the Java build. First, remove the weird
redirections between the build files, which didn't work completely. Now you just go to the directory of your choice and run make. Clean up the build files to have a logical order, fix the unnecessary rebuilds, prevent the deleting targets from removing files they're not responsible for. Ant 1.3 does not have a bug. It deletes directories just fine if you follow the documentation.
Diffstat (limited to 'contrib/retep')
-rw-r--r--contrib/retep/Makefile30
-rw-r--r--contrib/retep/build.xml77
2 files changed, 80 insertions, 27 deletions
diff --git a/contrib/retep/Makefile b/contrib/retep/Makefile
new file mode 100644
index 00000000000..e5de9c7ac80
--- /dev/null
+++ b/contrib/retep/Makefile
@@ -0,0 +1,30 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for contributed retep tools
+#
+# Copyright (c) 2001, PostgreSQL Global Development Group
+#
+# $Header: /cvsroot/pgsql/contrib/retep/Attic/Makefile,v 1.1 2001/07/06 23:07:20 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = contrib/retep
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+
+all:
+ $(ANT) -buildfile $(srcdir)/build.xml all
+
+install: installdirs
+ $(ANT) -buildfile $(srcdir)/build.xml install \
+ -Dinstall.directory=$(javadir)
+
+installdirs:
+ $(mkinstalldirs) $(javadir)
+
+uninstall:
+ $(ANT) -buildfile $(srcdir)/build.xml uninstall \
+ -Dinstall.directory=$(javadir)
+
+clean distclean maintainer-clean:
+ $(ANT) -buildfile $(srcdir)/build.xml clean
diff --git a/contrib/retep/build.xml b/contrib/retep/build.xml
index 9fbc0f61ac5..04a8db5c2f0 100644
--- a/contrib/retep/build.xml
+++ b/contrib/retep/build.xml
@@ -1,18 +1,23 @@
+<?xml version="1.0"?>
<!--
build file to build the donated retep tools packages
- $Id: build.xml,v 1.7 2001/05/17 03:22:53 momjian Exp $
+ $Header: /cvsroot/pgsql/contrib/retep/Attic/build.xml,v 1.8 2001/07/06 23:07:20 petere Exp $
-->
-<project name="retep" default="jar" basedir=".">
+<!DOCTYPE project [
+ <!ENTITY jarname "retepTools.jar">
+]>
+
+<project name="retep" default="all" basedir=".">
<!-- set global properties for this build -->
- <property name="src" value="." />
- <property name="dest" value="build" />
+ <property name="srcdir" value="." />
+ <property name="builddir" value="build" />
<property name="package" value="uk/org/retep" />
- <property name="jars" value="jars" />
+ <property name="jardir" value="jars" />
<!-- Some checks used to build dependent on the environment -->
<target name="checks">
@@ -23,53 +28,71 @@
</target>
<target name="warning" depends="checks" unless="jdk1.2+">
- <echo message="WARNING -- contributed retep tools need jdk1.2 or later -- compilation NOT done." />
+ <echo>
+*** WARNING: Contributed retep tools need jdk1.2 or later.
+*** Compilation NOT done
+ </echo>
</target>
- <!-- Prepares the build by creating a directory to place the class files -->
- <target name="prepare">
- <mkdir dir="${dest}" />
- <mkdir dir="${jars}" />
+ <!-- default target -->
+ <target name="all">
+ <antcall target="jar" />
</target>
- <!-- This target removes any class files from the build directory -->
- <target name="clean">
- <delete>
- <fileset dir="${dest}" />
- <fileset dir="${jars}" />
- </delete>
- </target>
+
+ <!-- Builds the various jar files -->
+ <target name="jar" depends="compile">
+ <jar jarfile="${jardir}/&jarname;" whenempty="fail">
+ <fileset dir="${builddir}">
+ <include name="**/*.class" />
+ </fileset>
+
+ <fileset dir="${srcdir}">
+ <include name="**/*.properties" />
+ </fileset>
+ </jar>
+ </target>
+
<!-- Builds the XML Tools -->
<target name="compile" depends="checks,prepare,warning" if="jdk1.2+">
- <javac srcdir="${src}" destdir="${dest}">
+ <javac srcdir="${srcdir}" destdir="${builddir}">
<include name="${package}/**" />
<exclude name="${package}/**" unless="jdk1.2+" />
</javac>
</target>
- <!-- Builds the various jar files -->
- <target name="jar" depends="compile">
- <jar jarfile="${jars}/retepTools.jar" basedir="${dest}">
- <include name="${package}/**" />
- </jar>
+
+ <!-- Prepares the build by creating a directory to place the class files -->
+ <target name="prepare">
+ <mkdir dir="${builddir}" />
+ <mkdir dir="${jardir}" />
</target>
- <target name="install" depends="jar" if="install.directory">
+
+ <target name="install" depends="all" if="install.directory">
<copy todir="${install.directory}" overwrite="true" filtering="off">
- <fileset dir="${jars}">
- <include name="**/*.jar" />
+ <fileset dir="${jardir}">
+ <include name="&jarname;" />
</fileset>
</copy>
</target>
+
<target name="uninstall" if="install.directory">
<delete>
<fileset dir="${install.directory}">
- <include name="**/*.jar" />
+ <include name="&jarname;" />
</fileset>
</delete>
</target>
+
+ <!-- This target removes any class files from the build directory -->
+ <target name="clean">
+ <delete quiet="true" dir="${builddir}" />
+ <delete quiet="true" dir="${jardir}" />
+ </target>
+
</project>