4
4
# Makefile for Java JDBC interface
5
5
#
6
6
# 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 $
8
8
#
9
9
# -------------------------------------------------------------------------
10
10
@@ -24,6 +24,10 @@ TOUCH= touch
24
24
.SUFFIXES :.class .java
25
25
.PHONY :all clean doc examples msg
26
26
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
+
27
31
# In 6.5, the all rule builds the makeVersion class which then calls make using
28
32
# the jdbc1 or jdbc2 rules
29
33
all :
34
38
@echo
35
39
@echo If you are using JDK1.1.x, you will need the JDBC1.2 driver.
36
40
@echo To compile, type:
37
- @echo" $( MAKE ) jdbc1"
41
+ @echo" make jdbc1 jar "
38
42
@echo
39
43
@echo" If you are using JDK1.2 (aka Java2) you need the JDBC2."
40
44
@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
42
51
@echo ------------------------------------------------------------
43
52
44
53
msg :
59
68
@echo
60
69
@echo ------------------------------------------------------------
61
70
@echo To build the examples, type:
62
- @echo" $( MAKE ) examples"
71
+ @echo" make examples"
63
72
@echo
64
73
@echo" To build the CORBA example (requires Java2):"
65
- @echo" $( MAKE ) corba"
74
+ @echo" make corba"
66
75
@echo ------------------------------------------------------------
67
76
@echo
68
77
@@ -72,88 +81,89 @@ dep depend:
72
81
doc :
73
82
export CLASSPATH=.; \
74
83
$(JAVADOC ) -public\
75
- postgresql\
76
- postgresql.fastpath\
77
- postgresql.largeobject
84
+ org. postgresql\
85
+ org. postgresql.fastpath\
86
+ org. postgresql.largeobject
78
87
79
88
# These classes form the driver. These, and only these are placed into
80
89
# 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
105
114
106
115
# 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
114
123
115
124
# 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
123
133
124
134
# This rule builds the JDBC1 compliant driver
125
135
jdbc1 :
126
- (echo" package postgresql;" ; \
136
+ (echo" packageorg. postgresql;" ; \
127
137
echo " public class DriverClass {" ; \
128
- echo " public static String connectClass=\" postgresql.jdbc1.Connection\" ;" ; \
138
+ echo " public static String connectClass=\" org. postgresql.jdbc1.Connection\" ;" ; \
129
139
echo " }" \
130
- )> postgresql /DriverClass.java
140
+ )> $( PGBASE ) /DriverClass.java
131
141
@$(MAKE ) jdbc1real
132
142
133
- jdbc1real :postgresql /DriverClass.class\
143
+ jdbc1real :$( PGBASE ) /DriverClass.class\
134
144
$(OBJ_COMMON ) $(OBJ_JDBC1 ) postgresql.jar msg
135
145
136
146
# This rule builds the JDBC2 compliant driver
137
147
jdbc2 :
138
- (echo" package postgresql;" ; \
148
+ (echo" packageorg. postgresql;" ; \
139
149
echo " public class DriverClass {" ; \
140
- echo " public static String connectClass=\" postgresql.jdbc2.Connection\" ;" ; \
150
+ echo " public static String connectClass=\" org. postgresql.jdbc2.Connection\" ;" ; \
141
151
echo " }" \
142
- )> postgresql /DriverClass.java
152
+ )> $( PGBASE ) /DriverClass.java
143
153
@$(MAKE ) jdbc2real
144
154
145
- jdbc2real :postgresql /DriverClass.class\
155
+ jdbc2real :$( PGBASE ) /DriverClass.class\
146
156
$(OBJ_COMMON ) $(OBJ_JDBC2 ) postgresql.jar msg
147
157
148
158
# If you have problems with this rule, replace the $( ) with ` ` as some
149
159
# shells (mainly sh under Solaris) doesn't recognise $( )
150
160
#
151
- # Note:This works by storing all compiled classes under thepostgresql
161
+ # Note:This works by storing all compiled classes under the$(PGBASE)
152
162
# directory. We use this later for compiling the dual-mode driver.
153
163
#
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)
157
167
158
168
# This rule removes any temporary and compiled files from the source tree.
159
169
clean :
@@ -170,30 +180,30 @@ clean:
170
180
# Java is unlike C in that one source file can generate several
171
181
# _Different_ file names
172
182
#
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
197
207
198
208
# ######################################################################
199
209
# These classes are in the example directory, and form the examples