Install Peter's Makefile.

This commit is contained in:
Bruce Momjian 2000-04-26 14:19:29 +00:00
parent 9d56aff7bc
commit 3c0685e423
1 changed files with 92 additions and 82 deletions

View File

@ -4,7 +4,7 @@
# Makefile for Java JDBC interface # Makefile for Java JDBC interface
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.18 2000/03/14 15:55:17 momjian Exp $ # $Id: Makefile,v 1.19 2000/04/26 14:19:29 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -24,6 +24,10 @@ TOUCH = touch
.SUFFIXES: .class .java .SUFFIXES: .class .java
.PHONY: all clean doc examples msg .PHONY: all clean doc examples msg
# This is the base directory of the driver. In 7.0, this changed from
# postgresql to org/postgresql
PGBASE = org/postgresql
# In 6.5, the all rule builds the makeVersion class which then calls make using # In 6.5, the all rule builds the makeVersion class which then calls make using
# the jdbc1 or jdbc2 rules # the jdbc1 or jdbc2 rules
all: all:
@ -34,11 +38,16 @@ all:
@echo @echo
@echo If you are using JDK1.1.x, you will need the JDBC1.2 driver. @echo If you are using JDK1.1.x, you will need the JDBC1.2 driver.
@echo To compile, type: @echo To compile, type:
@echo " $(MAKE) jdbc1" @echo " make jdbc1 jar"
@echo @echo
@echo "If you are using JDK1.2 (aka Java2) you need the JDBC2." @echo "If you are using JDK1.2 (aka Java2) you need the JDBC2."
@echo To compile, type: @echo To compile, type:
@echo " $(MAKE) jdbc2" @echo " make jdbc2 jar"
@echo
@echo Once you have done this, a postgresql.jar file will be
@echo produced. This file will only work with that particular
@echo JVM.
@echo
@echo ------------------------------------------------------------ @echo ------------------------------------------------------------
msg: msg:
@ -59,10 +68,10 @@ msg:
@echo @echo
@echo ------------------------------------------------------------ @echo ------------------------------------------------------------
@echo To build the examples, type: @echo To build the examples, type:
@echo " $(MAKE) examples" @echo " make examples"
@echo @echo
@echo "To build the CORBA example (requires Java2):" @echo "To build the CORBA example (requires Java2):"
@echo " $(MAKE) corba" @echo " make corba"
@echo ------------------------------------------------------------ @echo ------------------------------------------------------------
@echo @echo
@ -72,88 +81,89 @@ dep depend:
doc: doc:
export CLASSPATH=.;\ export CLASSPATH=.;\
$(JAVADOC) -public \ $(JAVADOC) -public \
postgresql \ org.postgresql \
postgresql.fastpath \ org.postgresql.fastpath \
postgresql.largeobject org.postgresql.largeobject
# These classes form the driver. These, and only these are placed into # These classes form the driver. These, and only these are placed into
# the jar file. # the jar file.
OBJ_COMMON= postgresql/Connection.class \ OBJ_COMMON= $(PGBASE)/Connection.class \
postgresql/Driver.class \ $(PGBASE)/Driver.class \
postgresql/Field.class \ $(PGBASE)/Field.class \
postgresql/PG_Stream.class \ $(PGBASE)/PG_Stream.class \
postgresql/ResultSet.class \ $(PGBASE)/ResultSet.class \
postgresql/errors.properties \ $(PGBASE)/errors.properties \
postgresql/errors_fr.properties \ $(PGBASE)/errors_fr.properties \
postgresql/fastpath/Fastpath.class \ $(PGBASE)/fastpath/Fastpath.class \
postgresql/fastpath/FastpathArg.class \ $(PGBASE)/fastpath/FastpathArg.class \
postgresql/geometric/PGbox.class \ $(PGBASE)/geometric/PGbox.class \
postgresql/geometric/PGcircle.class \ $(PGBASE)/geometric/PGcircle.class \
postgresql/geometric/PGline.class \ $(PGBASE)/geometric/PGline.class \
postgresql/geometric/PGlseg.class \ $(PGBASE)/geometric/PGlseg.class \
postgresql/geometric/PGpath.class \ $(PGBASE)/geometric/PGpath.class \
postgresql/geometric/PGpoint.class \ $(PGBASE)/geometric/PGpoint.class \
postgresql/geometric/PGpolygon.class \ $(PGBASE)/geometric/PGpolygon.class \
postgresql/largeobject/LargeObject.class \ $(PGBASE)/largeobject/LargeObject.class \
postgresql/largeobject/LargeObjectManager.class \ $(PGBASE)/largeobject/LargeObjectManager.class \
postgresql/util/PGmoney.class \ $(PGBASE)/util/PGmoney.class \
postgresql/util/PGobject.class \ $(PGBASE)/util/PGobject.class \
postgresql/util/PGtokenizer.class \ $(PGBASE)/util/PGtokenizer.class \
postgresql/util/PSQLException.class \ $(PGBASE)/util/PSQLException.class \
postgresql/util/Serialize.class \ $(PGBASE)/util/Serialize.class \
postgresql/util/UnixCrypt.class $(PGBASE)/util/UnixCrypt.class
# These files are unique to the JDBC 1 (JDK 1.1) driver # These files are unique to the JDBC 1 (JDK 1.1) driver
OBJ_JDBC1= postgresql/jdbc1/CallableStatement.class \ OBJ_JDBC1= $(PGBASE)/jdbc1/CallableStatement.class \
postgresql/jdbc1/Connection.class \ $(PGBASE)/jdbc1/Connection.class \
postgresql/jdbc1/DatabaseMetaData.class \ $(PGBASE)/jdbc1/DatabaseMetaData.class \
postgresql/jdbc1/PreparedStatement.class \ $(PGBASE)/jdbc1/PreparedStatement.class \
postgresql/jdbc1/ResultSet.class \ $(PGBASE)/jdbc1/ResultSet.class \
postgresql/jdbc1/ResultSetMetaData.class \ $(PGBASE)/jdbc1/ResultSetMetaData.class \
postgresql/jdbc1/Statement.class $(PGBASE)/jdbc1/Statement.class
# These files are unique to the JDBC 2 (JDK 2 nee 1.2) driver # These files are unique to the JDBC 2 (JDK 2 nee 1.2) driver
OBJ_JDBC2= postgresql/jdbc2/ResultSet.class \ OBJ_JDBC2= $(PGBASE)/jdbc2/ResultSet.class \
postgresql/jdbc2/PreparedStatement.class \ $(PGBASE)/jdbc2/PreparedStatement.class \
postgresql/jdbc2/CallableStatement.class \ $(PGBASE)/jdbc2/CallableStatement.class \
postgresql/jdbc2/Connection.class \ $(PGBASE)/jdbc2/Connection.class \
postgresql/jdbc2/DatabaseMetaData.class \ $(PGBASE)/jdbc2/DatabaseMetaData.class \
postgresql/jdbc2/ResultSetMetaData.class \ $(PGBASE)/jdbc2/ResultSetMetaData.class \
postgresql/jdbc2/Statement.class $(PGBASE)/jdbc2/Statement.class \
$(PGBASE)/largeobject/PGblob.class
# This rule builds the JDBC1 compliant driver # This rule builds the JDBC1 compliant driver
jdbc1: jdbc1:
(echo "package postgresql;" ;\ (echo "package org.postgresql;" ;\
echo "public class DriverClass {" ;\ echo "public class DriverClass {" ;\
echo "public static String connectClass=\"postgresql.jdbc1.Connection\";" ;\ echo "public static String connectClass=\"org.postgresql.jdbc1.Connection\";" ;\
echo "}" \ echo "}" \
) >postgresql/DriverClass.java ) >$(PGBASE)/DriverClass.java
@$(MAKE) jdbc1real @$(MAKE) jdbc1real
jdbc1real: postgresql/DriverClass.class \ jdbc1real: $(PGBASE)/DriverClass.class \
$(OBJ_COMMON) $(OBJ_JDBC1) postgresql.jar msg $(OBJ_COMMON) $(OBJ_JDBC1) postgresql.jar msg
# This rule builds the JDBC2 compliant driver # This rule builds the JDBC2 compliant driver
jdbc2: jdbc2:
(echo "package postgresql;" ;\ (echo "package org.postgresql;" ;\
echo "public class DriverClass {" ;\ echo "public class DriverClass {" ;\
echo "public static String connectClass=\"postgresql.jdbc2.Connection\";" ;\ echo "public static String connectClass=\"org.postgresql.jdbc2.Connection\";" ;\
echo "}" \ echo "}" \
) >postgresql/DriverClass.java ) >$(PGBASE)/DriverClass.java
@$(MAKE) jdbc2real @$(MAKE) jdbc2real
jdbc2real: postgresql/DriverClass.class \ jdbc2real: $(PGBASE)/DriverClass.class \
$(OBJ_COMMON) $(OBJ_JDBC2) postgresql.jar msg $(OBJ_COMMON) $(OBJ_JDBC2) postgresql.jar msg
# If you have problems with this rule, replace the $( ) with ` ` as some # If you have problems with this rule, replace the $( ) with ` ` as some
# shells (mainly sh under Solaris) doesn't recognise $( ) # shells (mainly sh under Solaris) doesn't recognise $( )
# #
# Note: This works by storing all compiled classes under the postgresql # Note: This works by storing all compiled classes under the $(PGBASE)
# directory. We use this later for compiling the dual-mode driver. # directory. We use this later for compiling the dual-mode driver.
# #
postgresql.jar: $(OBJ_COMMON) postgresql.jar: $(OBJ) $(OBJ_COMMON)
$(JAR) -c0f $@ `$(FIND) postgresql -name "*.class" -print` \ $(JAR) -c0f $@ `$(FIND) $(PGBASE) -name "*.class" -print` \
$(wildcard postgresql/*.properties) $(wildcard $(PGBASE)/*.properties)
# This rule removes any temporary and compiled files from the source tree. # This rule removes any temporary and compiled files from the source tree.
clean: clean:
@ -170,30 +180,30 @@ clean:
# Java is unlike C in that one source file can generate several # Java is unlike C in that one source file can generate several
# _Different_ file names # _Different_ file names
# #
postgresql/Connection.class: postgresql/Connection.java $(PGBASE)/Connection.class: $(PGBASE)/Connection.java
postgresql/DatabaseMetaData.class: postgresql/DatabaseMetaData.java $(PGBASE)/DatabaseMetaData.class: $(PGBASE)/DatabaseMetaData.java
postgresql/Driver.class: postgresql/Driver.java $(PGBASE)/Driver.class: $(PGBASE)/Driver.java
postgresql/Field.class: postgresql/Field.java $(PGBASE)/Field.class: $(PGBASE)/Field.java
postgresql/PG_Stream.class: postgresql/PG_Stream.java $(PGBASE)/PG_Stream.class: $(PGBASE)/PG_Stream.java
postgresql/PreparedStatement.class: postgresql/PreparedStatement.java $(PGBASE)/PreparedStatement.class: $(PGBASE)/PreparedStatement.java
postgresql/ResultSet.class: postgresql/ResultSet.java $(PGBASE)/ResultSet.class: $(PGBASE)/ResultSet.java
postgresql/ResultSetMetaData.class: postgresql/ResultSetMetaData.java $(PGBASE)/ResultSetMetaData.class: $(PGBASE)/ResultSetMetaData.java
postgresql/Statement.class: postgresql/Statement.java $(PGBASE)/Statement.class: $(PGBASE)/Statement.java
postgresql/fastpath/Fastpath.class: postgresql/fastpath/Fastpath.java $(PGBASE)/fastpath/Fastpath.class: $(PGBASE)/fastpath/Fastpath.java
postgresql/fastpath/FastpathArg.class: postgresql/fastpath/FastpathArg.java $(PGBASE)/fastpath/FastpathArg.class: $(PGBASE)/fastpath/FastpathArg.java
postgresql/geometric/PGbox.class: postgresql/geometric/PGbox.java $(PGBASE)/geometric/PGbox.class: $(PGBASE)/geometric/PGbox.java
postgresql/geometric/PGcircle.class: postgresql/geometric/PGcircle.java $(PGBASE)/geometric/PGcircle.class: $(PGBASE)/geometric/PGcircle.java
postgresql/geometric/PGlseg.class: postgresql/geometric/PGlseg.java $(PGBASE)/geometric/PGlseg.class: $(PGBASE)/geometric/PGlseg.java
postgresql/geometric/PGpath.class: postgresql/geometric/PGpath.java $(PGBASE)/geometric/PGpath.class: $(PGBASE)/geometric/PGpath.java
postgresql/geometric/PGpoint.class: postgresql/geometric/PGpoint.java $(PGBASE)/geometric/PGpoint.class: $(PGBASE)/geometric/PGpoint.java
postgresql/geometric/PGpolygon.class: postgresql/geometric/PGpolygon.java $(PGBASE)/geometric/PGpolygon.class: $(PGBASE)/geometric/PGpolygon.java
postgresql/largeobject/LargeObject.class: postgresql/largeobject/LargeObject.java $(PGBASE)/largeobject/LargeObject.class: $(PGBASE)/largeobject/LargeObject.java
postgresql/largeobject/LargeObjectManager.class: postgresql/largeobject/LargeObjectManager.java $(PGBASE)/largeobject/LargeObjectManager.class: $(PGBASE)/largeobject/LargeObjectManager.java
postgresql/util/PGmoney.class: postgresql/util/PGmoney.java $(PGBASE)/util/PGmoney.class: $(PGBASE)/util/PGmoney.java
postgresql/util/PGobject.class: postgresql/util/PGobject.java $(PGBASE)/util/PGobject.class: $(PGBASE)/util/PGobject.java
postgresql/util/PGtokenizer.class: postgresql/util/PGtokenizer.java $(PGBASE)/util/PGtokenizer.class: $(PGBASE)/util/PGtokenizer.java
postgresql/util/Serialize.class: postgresql/util/Serialize.java $(PGBASE)/util/Serialize.class: $(PGBASE)/util/Serialize.java
postgresql/util/UnixCrypt.class: postgresql/util/UnixCrypt.java $(PGBASE)/util/UnixCrypt.class: $(PGBASE)/util/UnixCrypt.java
####################################################################### #######################################################################
# These classes are in the example directory, and form the examples # These classes are in the example directory, and form the examples