44# Makefile for Java JDBC interface
55#
66# IDENTIFICATION
7- # $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/ Makefile,v 1.18 2000/03/14 15:55:17 momjian Exp $
7+ # $Id: Makefile,v 1.19 2000/04/26 14:19:29 momjian Exp $
88#
99# -------------------------------------------------------------------------
1010
@@ -24,6 +24,10 @@ TOUCH= touch
2424.SUFFIXES :.class .java
2525.PHONY :all clean doc examples msg
2626
27+ # This is the base directory of the driver. In 7.0, this changed from
28+ # postgresql to org/postgresql
29+ PGBASE = org/postgresql
30+
2731# In 6.5, the all rule builds the makeVersion class which then calls make using
2832# the jdbc1 or jdbc2 rules
2933all :
3438@echo
3539@echo If you are using JDK1.1.x, you will need the JDBC1.2 driver.
3640@echo To compile, type:
37- @echo" $( MAKE ) jdbc1"
41+ @echo" make jdbc1 jar "
3842@echo
3943@echo" If you are using JDK1.2 (aka Java2) you need the JDBC2."
4044@echo To compile, type:
41- @echo" $( MAKE) jdbc2"
45+ @echo" make jdbc2 jar"
46+ @echo
47+ @echo Once you havedone this, a postgresql.jar file will be
48+ @echo produced. This file will only work with that particular
49+ @echo JVM.
50+ @echo
4251@echo ------------------------------------------------------------
4352
4453msg :
5968@echo
6069@echo ------------------------------------------------------------
6170@echo To build the examples, type:
62- @echo" $( MAKE ) examples"
71+ @echo" make examples"
6372@echo
6473@echo" To build the CORBA example (requires Java2):"
65- @echo" $( MAKE ) corba"
74+ @echo" make corba"
6675@echo ------------------------------------------------------------
6776@echo
6877
@@ -72,88 +81,89 @@ dep depend:
7281doc :
7382export CLASSPATH=.; \
7483$(JAVADOC ) -public\
75- postgresql\
76- postgresql.fastpath\
77- postgresql.largeobject
84+ org. postgresql\
85+ org. postgresql.fastpath\
86+ org. postgresql.largeobject
7887
7988# These classes form the driver. These, and only these are placed into
8089# the jar file.
81- OBJ_COMMON =postgresql /Connection.class\
82- postgresql /Driver.class\
83- postgresql /Field.class\
84- postgresql /PG_Stream.class\
85- postgresql /ResultSet.class\
86- postgresql /errors.properties\
87- postgresql /errors_fr.properties\
88- postgresql /fastpath/Fastpath.class\
89- postgresql /fastpath/FastpathArg.class\
90- postgresql /geometric/PGbox.class\
91- postgresql /geometric/PGcircle.class\
92- postgresql /geometric/PGline.class\
93- postgresql /geometric/PGlseg.class\
94- postgresql /geometric/PGpath.class\
95- postgresql /geometric/PGpoint.class\
96- postgresql /geometric/PGpolygon.class\
97- postgresql /largeobject/LargeObject.class\
98- postgresql /largeobject/LargeObjectManager.class\
99- postgresql /util/PGmoney.class\
100- postgresql /util/PGobject.class\
101- postgresql /util/PGtokenizer.class\
102- postgresql /util/PSQLException.class\
103- postgresql /util/Serialize.class\
104- postgresql /util/UnixCrypt.class
90+ OBJ_COMMON =$( PGBASE ) /Connection.class\
91+ $( PGBASE ) /Driver.class\
92+ $( PGBASE ) /Field.class\
93+ $( PGBASE ) /PG_Stream.class\
94+ $( PGBASE ) /ResultSet.class\
95+ $( PGBASE ) /errors.properties\
96+ $( PGBASE ) /errors_fr.properties\
97+ $( PGBASE ) /fastpath/Fastpath.class\
98+ $( PGBASE ) /fastpath/FastpathArg.class\
99+ $( PGBASE ) /geometric/PGbox.class\
100+ $( PGBASE ) /geometric/PGcircle.class\
101+ $( PGBASE ) /geometric/PGline.class\
102+ $( PGBASE ) /geometric/PGlseg.class\
103+ $( PGBASE ) /geometric/PGpath.class\
104+ $( PGBASE ) /geometric/PGpoint.class\
105+ $( PGBASE ) /geometric/PGpolygon.class\
106+ $( PGBASE ) /largeobject/LargeObject.class\
107+ $( PGBASE ) /largeobject/LargeObjectManager.class\
108+ $( PGBASE ) /util/PGmoney.class\
109+ $( PGBASE ) /util/PGobject.class\
110+ $( PGBASE ) /util/PGtokenizer.class\
111+ $( PGBASE ) /util/PSQLException.class\
112+ $( PGBASE ) /util/Serialize.class\
113+ $( PGBASE ) /util/UnixCrypt.class
105114
106115# These files are unique to the JDBC 1 (JDK 1.1) driver
107- OBJ_JDBC1 =postgresql /jdbc1/CallableStatement.class\
108- postgresql /jdbc1/Connection.class\
109- postgresql /jdbc1/DatabaseMetaData.class\
110- postgresql /jdbc1/PreparedStatement.class\
111- postgresql /jdbc1/ResultSet.class\
112- postgresql /jdbc1/ResultSetMetaData.class\
113- postgresql /jdbc1/Statement.class
116+ OBJ_JDBC1 =$( PGBASE ) /jdbc1/CallableStatement.class\
117+ $( PGBASE ) /jdbc1/Connection.class\
118+ $( PGBASE ) /jdbc1/DatabaseMetaData.class\
119+ $( PGBASE ) /jdbc1/PreparedStatement.class\
120+ $( PGBASE ) /jdbc1/ResultSet.class\
121+ $( PGBASE ) /jdbc1/ResultSetMetaData.class\
122+ $( PGBASE ) /jdbc1/Statement.class
114123
115124# These files are unique to the JDBC 2 (JDK 2 nee 1.2) driver
116- OBJ_JDBC2 =postgresql/jdbc2/ResultSet.class\
117- postgresql/jdbc2/PreparedStatement.class\
118- postgresql/jdbc2/CallableStatement.class\
119- postgresql/jdbc2/Connection.class\
120- postgresql/jdbc2/DatabaseMetaData.class\
121- postgresql/jdbc2/ResultSetMetaData.class\
122- postgresql/jdbc2/Statement.class
125+ OBJ_JDBC2 =$(PGBASE ) /jdbc2/ResultSet.class\
126+ $(PGBASE ) /jdbc2/PreparedStatement.class\
127+ $(PGBASE ) /jdbc2/CallableStatement.class\
128+ $(PGBASE ) /jdbc2/Connection.class\
129+ $(PGBASE ) /jdbc2/DatabaseMetaData.class\
130+ $(PGBASE ) /jdbc2/ResultSetMetaData.class\
131+ $(PGBASE ) /jdbc2/Statement.class\
132+ $(PGBASE ) /largeobject/PGblob.class
123133
124134# This rule builds the JDBC1 compliant driver
125135jdbc1 :
126- (echo" package postgresql;" ; \
136+ (echo" packageorg. postgresql;" ; \
127137echo " public class DriverClass {" ; \
128- echo " public static String connectClass=\" postgresql.jdbc1.Connection\" ;" ; \
138+ echo " public static String connectClass=\" org. postgresql.jdbc1.Connection\" ;" ; \
129139echo " }" \
130- )> postgresql /DriverClass.java
140+ )> $( PGBASE ) /DriverClass.java
131141@$(MAKE ) jdbc1real
132142
133- jdbc1real :postgresql /DriverClass.class\
143+ jdbc1real :$( PGBASE ) /DriverClass.class\
134144$(OBJ_COMMON ) $(OBJ_JDBC1 ) postgresql.jar msg
135145
136146# This rule builds the JDBC2 compliant driver
137147jdbc2 :
138- (echo" package postgresql;" ; \
148+ (echo" packageorg. postgresql;" ; \
139149echo " public class DriverClass {" ; \
140- echo " public static String connectClass=\" postgresql.jdbc2.Connection\" ;" ; \
150+ echo " public static String connectClass=\" org. postgresql.jdbc2.Connection\" ;" ; \
141151echo " }" \
142- )> postgresql /DriverClass.java
152+ )> $( PGBASE ) /DriverClass.java
143153@$(MAKE ) jdbc2real
144154
145- jdbc2real :postgresql /DriverClass.class\
155+ jdbc2real :$( PGBASE ) /DriverClass.class\
146156$(OBJ_COMMON ) $(OBJ_JDBC2 ) postgresql.jar msg
147157
148158# If you have problems with this rule, replace the $( ) with ` ` as some
149159# shells (mainly sh under Solaris) doesn't recognise $( )
150160#
151- # Note:This works by storing all compiled classes under thepostgresql
161+ # Note:This works by storing all compiled classes under the$(PGBASE)
152162# directory. We use this later for compiling the dual-mode driver.
153163#
154- postgresql.jar :$(OBJ_COMMON )
155- $(JAR ) -c0f$@ ` $( FIND) postgresql -name" *.class" -print` \
156- $(wildcard postgresql /* .properties)
164+ postgresql.jar :$(OBJ ) $( OBJ_COMMON )
165+ $(JAR ) -c0f$@ ` $( FIND) $( PGBASE ) -name" *.class" -print` \
166+ $(wildcard $( PGBASE ) /* .properties)
157167
158168# This rule removes any temporary and compiled files from the source tree.
159169clean :
@@ -170,30 +180,30 @@ clean:
170180# Java is unlike C in that one source file can generate several
171181# _Different_ file names
172182#
173- postgresql /Connection.class :postgresql /Connection.java
174- postgresql /DatabaseMetaData.class :postgresql /DatabaseMetaData.java
175- postgresql /Driver.class :postgresql /Driver.java
176- postgresql /Field.class :postgresql /Field.java
177- postgresql /PG_Stream.class :postgresql /PG_Stream.java
178- postgresql /PreparedStatement.class :postgresql /PreparedStatement.java
179- postgresql /ResultSet.class :postgresql /ResultSet.java
180- postgresql /ResultSetMetaData.class :postgresql /ResultSetMetaData.java
181- postgresql /Statement.class :postgresql /Statement.java
182- postgresql /fastpath/Fastpath.class :postgresql /fastpath/Fastpath.java
183- postgresql /fastpath/FastpathArg.class :postgresql /fastpath/FastpathArg.java
184- postgresql /geometric/PGbox.class :postgresql /geometric/PGbox.java
185- postgresql /geometric/PGcircle.class :postgresql /geometric/PGcircle.java
186- postgresql /geometric/PGlseg.class :postgresql /geometric/PGlseg.java
187- postgresql /geometric/PGpath.class :postgresql /geometric/PGpath.java
188- postgresql /geometric/PGpoint.class :postgresql /geometric/PGpoint.java
189- postgresql /geometric/PGpolygon.class :postgresql /geometric/PGpolygon.java
190- postgresql /largeobject/LargeObject.class :postgresql /largeobject/LargeObject.java
191- postgresql /largeobject/LargeObjectManager.class :postgresql /largeobject/LargeObjectManager.java
192- postgresql /util/PGmoney.class :postgresql /util/PGmoney.java
193- postgresql /util/PGobject.class :postgresql /util/PGobject.java
194- postgresql /util/PGtokenizer.class :postgresql /util/PGtokenizer.java
195- postgresql /util/Serialize.class :postgresql /util/Serialize.java
196- postgresql /util/UnixCrypt.class :postgresql /util/UnixCrypt.java
183+ $( PGBASE ) /Connection.class :$( PGBASE ) /Connection.java
184+ $( PGBASE ) /DatabaseMetaData.class :$( PGBASE ) /DatabaseMetaData.java
185+ $( PGBASE ) /Driver.class :$( PGBASE ) /Driver.java
186+ $( PGBASE ) /Field.class :$( PGBASE ) /Field.java
187+ $( PGBASE ) /PG_Stream.class :$( PGBASE ) /PG_Stream.java
188+ $( PGBASE ) /PreparedStatement.class :$( PGBASE ) /PreparedStatement.java
189+ $( PGBASE ) /ResultSet.class :$( PGBASE ) /ResultSet.java
190+ $( PGBASE ) /ResultSetMetaData.class :$( PGBASE ) /ResultSetMetaData.java
191+ $( PGBASE ) /Statement.class :$( PGBASE ) /Statement.java
192+ $( PGBASE ) /fastpath/Fastpath.class :$( PGBASE ) /fastpath/Fastpath.java
193+ $( PGBASE ) /fastpath/FastpathArg.class :$( PGBASE ) /fastpath/FastpathArg.java
194+ $( PGBASE ) /geometric/PGbox.class :$( PGBASE ) /geometric/PGbox.java
195+ $( PGBASE ) /geometric/PGcircle.class :$( PGBASE ) /geometric/PGcircle.java
196+ $( PGBASE ) /geometric/PGlseg.class :$( PGBASE ) /geometric/PGlseg.java
197+ $( PGBASE ) /geometric/PGpath.class :$( PGBASE ) /geometric/PGpath.java
198+ $( PGBASE ) /geometric/PGpoint.class :$( PGBASE ) /geometric/PGpoint.java
199+ $( PGBASE ) /geometric/PGpolygon.class :$( PGBASE ) /geometric/PGpolygon.java
200+ $( PGBASE ) /largeobject/LargeObject.class :$( PGBASE ) /largeobject/LargeObject.java
201+ $( PGBASE ) /largeobject/LargeObjectManager.class :$( PGBASE ) /largeobject/LargeObjectManager.java
202+ $( PGBASE ) /util/PGmoney.class :$( PGBASE ) /util/PGmoney.java
203+ $( PGBASE ) /util/PGobject.class :$( PGBASE ) /util/PGobject.java
204+ $( PGBASE ) /util/PGtokenizer.class :$( PGBASE ) /util/PGtokenizer.java
205+ $( PGBASE ) /util/Serialize.class :$( PGBASE ) /util/Serialize.java
206+ $( PGBASE ) /util/UnixCrypt.class :$( PGBASE ) /util/UnixCrypt.java
197207
198208# ######################################################################
199209# These classes are in the example directory, and form the examples