mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.22 2001/06/18 17:20:56 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.23 2001/07/06 23:07:19 petere Exp $
|
||||
|
||||
subdir = contrib
|
||||
top_builddir = ..
|
||||
@ -38,6 +38,11 @@ WANTED_DIRS = \
|
||||
userlock \
|
||||
vacuumlo
|
||||
|
||||
ifeq ($(with_java),yes)
|
||||
WANTED_DIRS += retep
|
||||
endif
|
||||
|
||||
|
||||
all install installdirs uninstall clean distclean maintainer-clean:
|
||||
for dir in $(WANTED_DIRS); do \
|
||||
if [ -f $$dir/Makefile ]; then \
|
||||
|
30
contrib/retep/Makefile
Normal file
30
contrib/retep/Makefile
Normal file
@ -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
|
@ -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>
|
||||
|
Reference in New Issue
Block a user