1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00

Add uninstall target to Java build.

Respect default port setting in JDBC driver.
Pick up version number from Makefile.global.
Change installation directory to share/java/.
Document.
This commit is contained in:
Peter Eisentraut
2001-03-11 11:07:01 +00:00
parent 9c2c9fcdfb
commit 671be61916
6 changed files with 94 additions and 61 deletions

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.27 2001/03/05 09:39:53 peter Exp $
# $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.28 2001/03/11 11:07:00 petere Exp $
#
#-------------------------------------------------------------------------
@ -12,17 +12,28 @@ subdir = src/interfaces/jdbc
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
all distprep:
@$(ANT) -buildfile $(top_builddir)/build.xml
majorversion := $(shell echo $(VERSION) | sed 's/^\([0-9][0-9]*\)\..*$$/\1/')
minorversion := $(shell echo $(VERSION) | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*$$/\1/')
install:
@$(ANT) -Dinstall.directory=$(DESTDIR)$(libdir)/java \
-buildfile $(top_builddir)/build.xml \
install
properties := -Dmajor=$(majorversion) -Dminor=$(minorversion) \
-Dfullversion=$(VERSION) \
-Ddef_pgport=$(DEF_PGPORT)
installdirs uninstall dep depend:
@echo Nothing for JDBC
all:
$(ANT) -buildfile $(top_srcdir)/build.xml $(properties)
install: installdirs
$(ANT) -Dinstall.directory=$(DESTDIR)$(datadir)/java \
-buildfile $(top_srcdir)/build.xml \
install $(properties)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)/java
uninstall:
$(ANT) -Dinstall.directory=$(DESTDIR)$(datadir)/java \
-buildfile $(top_srcdir)/build.xml \
uninstall
clean distclean maintainer-clean:
@$(ANT) -buildfile $(top_builddir)/build.xml clean
$(ANT) -buildfile $(top_srcdir)/build.xml clean

View File

@ -3,7 +3,7 @@
build file to allow ant (http://jakarta.apache.org/ant/) to be used
to build the PostgreSQL JDBC Driver.
$Id: build.xml,v 1.7 2001/03/05 09:40:01 peter Exp $
$Id: build.xml,v 1.8 2001/03/11 11:07:00 petere Exp $
-->
@ -14,8 +14,6 @@
<property name="jars" value="jars" />
<property name="dest" value="build" />
<property name="package" value="org/postgresql" />
<property name="major" value="7" />
<property name="minor" value="1" />
<!--
defaults for the tests - overide these if required
@ -68,8 +66,9 @@
<!-- Some defaults -->
<filter token="MAJORVERSION" value="${major}" />
<filter token="MINORVERSION" value="${minor}" />
<filter token="VERSION" value="PostgreSQL ${major}.${minor} ${edition}" />
<filter token="VERSION" value="PostgreSQL ${fullversion} ${edition}" />
<filter token="JDBCCONNECTCLASS" value="${connectclass}" />
<filter token="DEF_PGPORT" value="${def_pgport}" />
<!-- Put a check for the current version here -->
@ -153,6 +152,17 @@
</copy>
</target>
<!--
Uninstall the jar file.
-->
<target name="uninstall" if="install.directory">
<delete>
<fileset dir="${install.directory}">
<include name="**/*.jar" />
</fileset>
</delete>
</target>
<!--
This compiles and executes the JUnit tests
-->

View File

@ -351,7 +351,7 @@ public class Driver implements java.sql.Driver
*/
public int port()
{
return Integer.parseInt(props.getProperty("PGPORT","5432"));
return Integer.parseInt(props.getProperty("PGPORT","@DEF_PGPORT@"));
}
/**