4
4
# Makefile for Java JDBC interface
5
5
#
6
6
# IDENTIFICATION
7
- # $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.14 1999/06/23 05:56:17 peter Exp $
7
+ # $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.15 1999/09/14 05:50:27 peter Exp $
8
8
#
9
9
# -------------------------------------------------------------------------
10
10
11
11
FIND = find
12
12
IDL2JAVA = idltojava -fno-cpp -fno-tie
13
13
JAR = jar
14
14
JAVA = java
15
- JAVAC = javac
15
+ JAVAC = javac -g
16
16
JAVADOC = javadoc
17
17
RM = rm -f
18
18
TOUCH = touch
@@ -22,12 +22,26 @@ TOUCH = touch
22
22
$(JAVAC ) $<
23
23
24
24
.SUFFIXES : .class .java
25
- .PHONY : all clean doc examples
25
+ .PHONY : all clean doc examples msg
26
26
27
27
# In 6.5, the all rule builds the makeVersion class which then calls make using
28
28
# the jdbc1 or jdbc2 rules
29
- all : makeVersion.class
30
- make $$($(JAVA ) makeVersion)
29
+ all :
30
+ @echo ------------------------------------------------------------
31
+ @echo Due to problems with some JVMs that dont return a meaningful
32
+ @echo version number, we have had to make the choice of what jdbc
33
+ @echo version is built as a compile time option.
34
+ @echo
35
+ @echo If you are using JDK1.1.x, you will need the JDBC1.2 driver.
36
+ @echo To compile, type:
37
+ @echo " make jdbc1"
38
+ @echo
39
+ @echo " If you are using JDK1.2 (aka Java2) you need the JDBC2."
40
+ @echo To compile, type:
41
+ @echo " make jdbc2"
42
+ @echo ------------------------------------------------------------
43
+
44
+ msg :
31
45
@echo ------------------------------------------------------------
32
46
@echo The JDBC driver has now been built. To make it available to
33
47
@echo other applications, copy the postgresql.jar file to a public
@@ -107,34 +121,29 @@ OBJ_JDBC2= postgresql/jdbc2/ResultSet.class \
107
121
postgresql/jdbc2/ResultSetMetaData.class \
108
122
postgresql/jdbc2/Statement.class
109
123
110
- # This rule should never occur, but will be called when makeVersion fails to
111
- # understand the java.version property correctly.
112
- jdbc0 :
113
- @echo
114
- @echo FATAL ERROR!
115
- @echo
116
- @echo makeVersion has not been able to determine what version of
117
- @echo the JDK you are using, and hence what version of the driver
118
- @echo to compile.
119
- @echo
120
- @echo There are two versions available, one that conforms to the
121
- @echo JDBC 1 specification, and one to the JDBC 2 specification.
122
- @echo
123
- @echo To build the driver for JDBC 1 (usually for JDK 1.1 thru 1.1.7)
124
- @echo then type: make jdbc1
125
- @echo
126
- @echo To build the driver for JDBC 2 (usually for JDK 1.2 and later)
127
- @echo then type: make jdbc2
128
- @echo
129
- @echo If you still have problems, then please email the interfaces
130
- @echo or bugs lists, or better still to me direct (peter@retep.org.uk)
131
- @echo
132
-
133
124
# This rule builds the JDBC1 compliant driver
134
- jdbc1 : $(OBJ_COMMON ) $(OBJ_JDBC1 ) postgresql.jar
125
+ jdbc1 :
126
+ (echo " package postgresql;" ; \
127
+ echo " public class DriverClass {" ; \
128
+ echo " public static String connectClass=\" postgresql.jdbc1.Connection\" ;" ; \
129
+ echo " }" \
130
+ ) > postgresql/DriverClass.java
131
+ @$(MAKE ) jdbc1real
132
+
133
+ jdbc2real : postgresql/DriverClass.class \
134
+ $(OBJ_COMMON ) $(OBJ_JDBC2 ) postgresql.jar msg
135
135
136
136
# This rule builds the JDBC2 compliant driver
137
- jdbc2 : $(OBJ_COMMON ) $(OBJ_JDBC2 ) postgresql.jar
137
+ jdbc2 :
138
+ (echo " package postgresql;" ; \
139
+ echo " public class DriverClass {" ; \
140
+ echo " public static String connectClass=\" postgresql.jdbc2.Connection\" ;" ; \
141
+ echo " }" \
142
+ ) > postgresql/DriverClass.java
143
+ @$(MAKE ) jdbc2real
144
+
145
+ jdbc2real : postgresql/DriverClass.class \
146
+ $(OBJ_COMMON ) $(OBJ_JDBC2 ) postgresql.jar msg
138
147
139
148
# If you have problems with this rule, replace the $( ) with ` ` as some
140
149
# shells (mainly sh under Solaris) doesn't recognise $( )
@@ -143,7 +152,7 @@ jdbc2: $(OBJ_COMMON) $(OBJ_JDBC2) postgresql.jar
143
152
# directory. We use this later for compiling the dual-mode driver.
144
153
#
145
154
postgresql.jar : $(OBJ ) $(OBJ_COMMON )
146
- $(JAR ) -c0f $@ $$( $( FIND ) postgresql -name "*.class" -print) \
155
+ $(JAR ) -c0f $@ ` $( FIND) postgresql -name " *.class" -print` \
147
156
$(wildcard postgresql/* .properties)
148
157
149
158
# This rule removes any temporary and compiled files from the source tree.
0 commit comments