Thread: Whatever ... JDBC build patch

Whatever ... JDBC build patch

From
Marko Kreen
Date:
I thought about the issue, then hacked a bit and
the result seems to be quite edible:

* spec.{jdbc1,jdbc2,jdbc2e} files which describe
  contents of different driver editions.  So main
  Makefile is very straightforward.

* make builds all source in one go, thus:

    . avoids hell when old .jar is in classpath
    . now it uses javac/jikes internal dependency trancing,
      so make does not need to know anything about project's
      internal dependencies.  For make, jar files
      depend directly on source.
    . it is faster

* driver type is researched in configure, which is the
  right place for it.

* ant.cfg in src/interfaces/jdbc, which is made with
  'make ant.cfg'.  After that the Ant is completely
  standalone.  Without ant.cfg the Ant needs to be
  called from Makefile.  Whether Ant should be completely
  dropped I do not know, ATM this seemed to be best way.


Not done:

- CORBA examples and tests does not build here, so
  those must be tested by someone else.

- Did not touch contrib/retep, IMHO it can stay as it is.

- have not tested if JDBC1 builds

- tested only with jdk1.3, jikes 1.14


Not my call:

- Whether to apply this, whether to keep Ant, this or both...


Comments?  Volunteers for testing?


--
marko


Attachment

Re: Whatever ... JDBC build patch

From
Gunnar Rønning
Date:
* Marko Kreen <marko@l-t.ee> wrote:
|
| * driver type is researched in configure, which is the
|   right place for it.

How do distributors that need to build all driver types proceed ?

Compile for each platform in different environments ?

--
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

Re: Whatever ... JDBC build patch

From
Peter Eisentraut
Date:
Gunnar Rønning writes:

> How do distributors that need to build all driver types proceed ?

I haven't seen one yet, but theoretically they should configure several
different build trees from one source tree.  Of course, this doesn't work
with Ant, but it's trivial with GNU make.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: Whatever ... JDBC build patch

From
Marko Kreen
Date:
On Sat, Oct 20, 2001 at 04:15:56AM +0200, Gunnar Rønning wrote:
> * Marko Kreen <marko@l-t.ee> wrote:
> |
> | * driver type is researched in configure, which is the
> |   right place for it.
>
> How do distributors that need to build all driver types proceed ?
>
> Compile for each platform in different environments ?

The standard is to ./configure separately whole tree
for every variant.

With my patch this can be done more easily tho':

----
cd src/interfaces/jdbc

make JARFILE=pg-jdbc1.jar JAVAC=javac-jdk11 clean jdbc1

make JARFILE=pg-jdbc2.jar JAVAC=javac-jdk12 clean jdbc2

CLASSPATH=j2ee.jar:... \
make JARFILE=pg-jdbc2e.jar JAVAC=javac-jdk12 clean jdbc2e
----

This should give a idea of what's possible.  In any case they
need to set up both jdk1.1 and 1.2...

Ofcourse something like the above can be made for current
make+Ant setup.

--
marko


Re: Whatever ... JDBC build patch

From
Ned Wolpert
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 20-Oct-2001 Peter Eisentraut wrote:
>> How do distributors that need to build all driver types proceed ?
>
> I haven't seen one yet, but theoretically they should configure several
> different build trees from one source tree.  Of course, this doesn't work
> with Ant, but it's trivial with GNU make.

Actually, I think you can, if I understand the question.  Simply have multiple
targets in the build process, one per driver type.  Each target builds the
driver if and-only-if the needed classes are loaded.


Virtually,
Ned Wolpert <ned.wolpert@knowledgenet.com>

D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE71Fx+iysnOdCML0URAvAJAJjcYuLk2CCeL1wooZ2dYTveYKxbAJ4xZ5z4
HzjKi22efx295LsmMfo5kw==
=WdGU
-----END PGP SIGNATURE-----