Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
dbd8d38f
Commit
dbd8d38f
authored
Apr 26, 2000
by
Peter Mount
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
third attempt
parent
4fc36902
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
276 additions
and
58 deletions
+276
-58
src/interfaces/Makefile
src/interfaces/Makefile
+276
-58
No files found.
src/interfaces/Makefile
View file @
dbd8d38f
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#
#
# Makefile.inc--
# Makefile
# Makefile for src/bin (utility programs)
# Makefile for Java JDBC interface
#
# Copyright (c) 1994, Regents of the University of California
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $
Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.36 2000/04/23 04:26:31 tgl
Exp $
# $
Id: Makefile,v 1.37 2000/04/26 05:50:18 peter
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
SRCDIR
=
..
FIND
=
find
include
$(SRCDIR)/Makefile.global
IDL2JAVA
=
idltojava
-fno-cpp
-fno-tie
JAR
=
jar
JAVA
=
java
# Note: the klugery for perl5 is to ensure that the perl5 shared lib
JAVAC
=
javac
-g
# gets built with the correct path to the installed location of libpq
JAVADOC
=
javadoc
# during "make install", but is built against the local tree during
RM
=
rm
-f
# ordinary building and testing. During install, we must also guard
TOUCH
=
touch
# against the likelihood that we don't have permissions to install into
# the Perl module library.
# This defines how to compile a java class
.java.class
:
.DEFAULT all install clean dep depend distclean
:
$(JAVAC)
$<
$(MAKE)
-C
libpq
$@
$(MAKE)
-C
ecpg
$@
.SUFFIXES
:
.class .java
ifeq
($(HAVE_Cplusplus), true)
.PHONY
:
all clean doc examples msg
$(MAKE)
-C
libpq++
$@
else
# This is the base directory of the driver. In 7.0, this changed from
echo
$(HAVE_Cplusplus)
: No C++
# postgresql to org/postgresql
endif
PGBASE
=
org/postgresql
$(MAKE)
-C
libpgeasy
$@
ifeq
($(USE_TCL), true)
# In 6.5, the all rule builds the makeVersion class which then calls make using
$(MAKE)
-C
libpgtcl
$@
# the jdbc1 or jdbc2 rules
endif
all
:
ifeq
($(USE_PERL), true)
@
echo
------------------------------------------------------------
if
[
"
$@
"
=
"install"
]
;
then
\
@
echo
Due to problems with some JVMs that dont
return
a meaningful
$(MAKE)
$(MFLAGS)
install-perl5
;
\
@
echo
version number, we have had to make the choice of what jdbc
else
\
@
echo
version is built as a compile
time
option.
$(MAKE)
$(MFLAGS)
perl5/Makefile
;
\
@
echo
$(MAKE)
$(MFLAGS)
-C
perl5
$@
;
\
@
echo
If you are using JDK1.1.x, you will need the JDBC1.2 driver.
fi
@
echo
To compile,
type
:
endif
@
echo
" make jdbc1 jar"
ifeq
($(USE_ODBC), true)
@
echo
$(MAKE)
-C
odbc
$@
@
echo
"If you are using JDK1.2 (aka Java2) you need the JDBC2."
endif
@
echo
To compile,
type
:
@
echo
" make jdbc2 jar"
perl5/Makefile
:
perl5/Makefile.PL
@
echo
cd
perl5
&&
$(PERL)
Makefile.PL
POLLUTE
=
1
@
echo
Once you have
done
this, a postgresql.jar file will be
@
echo
produced. This file will only work with that particular
install-perl5
:
perl5/Makefile
@
echo
JVM.
$(MAKE)
-C
perl5 clean
@
echo
cd
perl5
&&
POSTGRES_HOME
=
"
$(POSTGRESDIR)
"
$(PERL)
Makefile.PL
POLLUTE
=
1
@
echo
------------------------------------------------------------
$(MAKE)
-C
perl5 all
-
@if
[
-w
`
$(MAKE)
--quiet
-C
perl5 echo-installdir
`
]
;
then
\
msg
:
$(MAKE)
$(MFLAGS)
-C
perl5
install
;
\
@
echo
------------------------------------------------------------
rm
-f
perl5/Makefile
;
\
@
echo
The JDBC driver has now been built. To make it available to
else
\
@
echo
other applications, copy the postgresql.jar file to a public
echo
"Skipping install of Perl module for lack of permissions."
;
\
@
echo
"place (under unix this could be /usr/local/lib) and add it"
echo
"To install it, cd into interfaces/perl5, su to become the"
;
\
@
echo
to the class path.
echo
"appropriate user, and do '
$(MAKE)
install'."
;
\
@
echo
fi
@
echo
Then either add
-Djdbc
.drivers
=
postgresql.Driver to the
@
echo
commandline when running your application, or edit the
.PHONY
:
install-perl5
@
echo
"properties file for your application (~/.hotjava/properties"
@
echo
"under unix for HotJava), and add a line containing"
@
echo
jdbc.drivers
=
postgresql.Driver
@
echo
@
echo
More details are
in
the README file and
in
the main postgresql
@
echo
documentation.
@
echo
@
echo
------------------------------------------------------------
@
echo
To build the examples,
type
:
@
echo
" make examples"
@
echo
@
echo
"To build the CORBA example (requires Java2):"
@
echo
" make corba"
@
echo
------------------------------------------------------------
@
echo
dep depend
:
# This rule builds the javadoc documentation
doc
:
export
CLASSPATH
=
.
;
\
$(JAVADOC)
-public
\
org.postgresql
\
org.postgresql.fastpath
\
org.postgresql.largeobject
# These classes form the driver. These, and only these are placed into
# the jar file.
OBJ_COMMON
=
$(PGBASE)
/Connection.class
\
$(PGBASE)
/Driver.class
\
$(PGBASE)
/Field.class
\
$(PGBASE)
/PG_Stream.class
\
$(PGBASE)
/ResultSet.class
\
$(PGBASE)
/errors.properties
\
$(PGBASE)
/errors_fr.properties
\
$(PGBASE)
/fastpath/Fastpath.class
\
$(PGBASE)
/fastpath/FastpathArg.class
\
$(PGBASE)
/geometric/PGbox.class
\
$(PGBASE)
/geometric/PGcircle.class
\
$(PGBASE)
/geometric/PGline.class
\
$(PGBASE)
/geometric/PGlseg.class
\
$(PGBASE)
/geometric/PGpath.class
\
$(PGBASE)
/geometric/PGpoint.class
\
$(PGBASE)
/geometric/PGpolygon.class
\
$(PGBASE)
/largeobject/LargeObject.class
\
$(PGBASE)
/largeobject/LargeObjectManager.class
\
$(PGBASE)
/util/PGmoney.class
\
$(PGBASE)
/util/PGobject.class
\
$(PGBASE)
/util/PGtokenizer.class
\
$(PGBASE)
/util/PSQLException.class
\
$(PGBASE)
/util/Serialize.class
\
$(PGBASE)
/util/UnixCrypt.class
# These files are unique to the JDBC 1 (JDK 1.1) driver
OBJ_JDBC1
=
$(PGBASE)
/jdbc1/CallableStatement.class
\
$(PGBASE)
/jdbc1/Connection.class
\
$(PGBASE)
/jdbc1/DatabaseMetaData.class
\
$(PGBASE)
/jdbc1/PreparedStatement.class
\
$(PGBASE)
/jdbc1/ResultSet.class
\
$(PGBASE)
/jdbc1/ResultSetMetaData.class
\
$(PGBASE)
/jdbc1/Statement.class
# These files are unique to the JDBC 2 (JDK 2 nee 1.2) driver
OBJ_JDBC2
=
$(PGBASE)
/jdbc2/ResultSet.class
\
$(PGBASE)
/jdbc2/PreparedStatement.class
\
$(PGBASE)
/jdbc2/CallableStatement.class
\
$(PGBASE)
/jdbc2/Connection.class
\
$(PGBASE)
/jdbc2/DatabaseMetaData.class
\
$(PGBASE)
/jdbc2/ResultSetMetaData.class
\
$(PGBASE)
/jdbc2/Statement.class
\
$(PGBASE)
/largeobject/PGblob.class
# This rule builds the JDBC1 compliant driver
jdbc1
:
(
echo
"package org.postgresql;"
;
\
echo
"public class DriverClass {"
;
\
echo
"public static String connectClass=
\"
org.postgresql.jdbc1.Connection
\"
;"
;
\
echo
"}"
\
)
>
$(PGBASE)
/DriverClass.java
@
$(MAKE)
jdbc1real
jdbc1real
:
$(PGBASE)/DriverClass.class
\
$(OBJ_COMMON) $(OBJ_JDBC1) postgresql.jar msg
# This rule builds the JDBC2 compliant driver
jdbc2
:
(
echo
"package org.postgresql;"
;
\
echo
"public class DriverClass {"
;
\
echo
"public static String connectClass=
\"
org.postgresql.jdbc2.Connection
\"
;"
;
\
echo
"}"
\
)
>
$(PGBASE)
/DriverClass.java
@
$(MAKE)
jdbc2real
jdbc2real
:
$(PGBASE)/DriverClass.class
\
$(OBJ_COMMON) $(OBJ_JDBC2) postgresql.jar msg
# If you have problems with this rule, replace the $( ) with ` ` as some
# shells (mainly sh under Solaris) doesn't recognise $( )
#
# Note: This works by storing all compiled classes under the $(PGBASE)
# directory. We use this later for compiling the dual-mode driver.
#
postgresql.jar
:
$(OBJ) $(OBJ_COMMON)
$(JAR)
-c0f
$@
`
$(FIND)
$(PGBASE)
-name
"*.class"
-print
`
\
$(
wildcard
$(PGBASE)
/
*
.properties
)
# This rule removes any temporary and compiled files from the source tree.
clean
:
$(FIND)
.
-name
"*~"
-exec
$(RM)
{}
\;
$(FIND)
.
-name
"*.class"
-exec
$(RM)
{}
\;
$(FIND)
.
-name
"*.html"
-exec
$(RM)
{}
\;
-
$(RM)
-rf
stock example/corba/stock.built
-
$(RM)
postgresql.jar
-
$(RM)
-rf
Package-postgresql
*
output
#######################################################################
# This helps make workout what classes are from what source files
#
# Java is unlike C in that one source file can generate several
# _Different_ file names
#
$(PGBASE)/Connection.class
:
$(PGBASE)/Connection.java
$(PGBASE)/DatabaseMetaData.class
:
$(PGBASE)/DatabaseMetaData.java
$(PGBASE)/Driver.class
:
$(PGBASE)/Driver.java
$(PGBASE)/Field.class
:
$(PGBASE)/Field.java
$(PGBASE)/PG_Stream.class
:
$(PGBASE)/PG_Stream.java
$(PGBASE)/PreparedStatement.class
:
$(PGBASE)/PreparedStatement.java
$(PGBASE)/ResultSet.class
:
$(PGBASE)/ResultSet.java
$(PGBASE)/ResultSetMetaData.class
:
$(PGBASE)/ResultSetMetaData.java
$(PGBASE)/Statement.class
:
$(PGBASE)/Statement.java
$(PGBASE)/fastpath/Fastpath.class
:
$(PGBASE)/fastpath/Fastpath.java
$(PGBASE)/fastpath/FastpathArg.class
:
$(PGBASE)/fastpath/FastpathArg.java
$(PGBASE)/geometric/PGbox.class
:
$(PGBASE)/geometric/PGbox.java
$(PGBASE)/geometric/PGcircle.class
:
$(PGBASE)/geometric/PGcircle.java
$(PGBASE)/geometric/PGlseg.class
:
$(PGBASE)/geometric/PGlseg.java
$(PGBASE)/geometric/PGpath.class
:
$(PGBASE)/geometric/PGpath.java
$(PGBASE)/geometric/PGpoint.class
:
$(PGBASE)/geometric/PGpoint.java
$(PGBASE)/geometric/PGpolygon.class
:
$(PGBASE)/geometric/PGpolygon.java
$(PGBASE)/largeobject/LargeObject.class
:
$(PGBASE)/largeobject/LargeObject.java
$(PGBASE)/largeobject/LargeObjectManager.class
:
$(PGBASE)/largeobject/LargeObjectManager.java
$(PGBASE)/util/PGmoney.class
:
$(PGBASE)/util/PGmoney.java
$(PGBASE)/util/PGobject.class
:
$(PGBASE)/util/PGobject.java
$(PGBASE)/util/PGtokenizer.class
:
$(PGBASE)/util/PGtokenizer.java
$(PGBASE)/util/Serialize.class
:
$(PGBASE)/util/Serialize.java
$(PGBASE)/util/UnixCrypt.class
:
$(PGBASE)/util/UnixCrypt.java
#######################################################################
# These classes are in the example directory, and form the examples
EX
=
example/basic.class
\
example/blobtest.class
\
example/datestyle.class
\
example/psql.class
\
example/ImageViewer.class
\
example/metadata.class
\
example/threadsafe.class
# example/Objects.class
# This rule builds the examples
examples
:
postgresql.jar $(EX)
@
echo
------------------------------------------------------------
@
echo
The examples have been built.
@
echo
@
echo
For instructions on how to use them, simply run them. For example:
@
echo
@
echo
" java example.blobtest"
@
echo
@
echo
This would display instructions on how to run the example.
@
echo
------------------------------------------------------------
@
echo
Available examples:
@
echo
@
echo
" example.basic Basic JDBC useage"
@
echo
" example.blobtest Binary Large Object tests"
@
echo
" example.datestyle Shows how datestyles are handled"
@
echo
" example.ImageViewer Example application storing images"
@
echo
" example.psql Simple java implementation of psql"
@
echo
" example.Objects Demonstrates Object Serialisation"
@
echo
" "
@
echo
These are not really examples, but tests various parts of the driver
@
echo
" example.metadata Tests various metadata methods"
@
echo
" example.threadsafe Tests the driver's thread safety"
@
echo
------------------------------------------------------------
@
echo
example/basic.class
:
example/basic.java
example/blobtest.class
:
example/blobtest.java
example/datestyle.class
:
example/datestyle.java
example/psql.class
:
example/psql.java
example/ImageViewer.class
:
example/ImageViewer.java
example/threadsafe.class
:
example/threadsafe.java
example/metadata.class
:
example/metadata.java
#######################################################################
#
# CORBA This extensive example shows how to integrate PostgreSQL
# JDBC & CORBA.
CORBASRC
=
$(
wildcard
example/corba/
*
.java
)
CORBAOBJ
=
$(
subst
.java,.class,
$(CORBASRC)
)
corba
:
jdbc2 example/corba/stock.built $(CORBAOBJ)
@
echo
-------------------------------------------------------
@
echo
The corba example has been built. Before running, you
@
echo
will need to
read
the example/corba/readme file on how
@
echo
to run the example.
@
echo
#
# This compiles our idl file and the stubs
#
# Note: The idl file is in example/corba, but it builds a directory under
# the current one. For safety, we delete that directory before running
# idltojava
#
example/corba/stock.built
:
example/corba/stock.idl
-
rm
-rf
stock
$(IDL2JAVA)
$<
$(JAVAC)
stock/
*
.java
$(TOUCH)
$@
# tip: we cant use $(wildcard stock/*.java) in the above rule as a race
# condition occurs, where javac is passed no arguments
#######################################################################
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment