Ant configuration
I dusted a old patch that integrates Ant better with
autoconf. It creates a file src/ant.cfg.in to pass
autoconf parameters to Ant. Now Ant can be used directly,
without going through Makefile.
'install.directory' is still passed in Makefile to keep
DESTDIR working.
--
marko
Index: configure.in
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/configure.in,v
retrieving revision 1.146
diff -u -c -r1.146 configure.in
*** configure.in 16 Oct 2001 10:09:15 -0000 1.146
--- configure.in 16 Oct 2001 13:37:46 -0000
***************
*** 32,37 ****
--- 32,42 ----
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")
+ VERSION_MAJOR=`echo $VERSION | sed 's/^\([[0-9]][[0-9]]*\)\..*\$/\1/'`
+ VERSION_MINOR=`echo $VERSION | sed 's/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*\$/\1/'`
+ AC_SUBST(VERSION_MAJOR)
+ AC_SUBST(VERSION_MINOR)
+
unset CDPATH
AC_CANONICAL_HOST
***************
*** 411,416 ****
--- 416,424 ----
[AC_MSG_RESULT(no)])
AC_SUBST(with_java)
+ JAVA_DEST=$prefix/share/java
+ AC_SUBST(JAVA_DEST)
+
dnl A note on the Kerberos and OpenSSL options:
dnl
dnl The user can give an argument to the option in order the specify
***************
*** 1218,1223 ****
--- 1226,1232 ----
src/GNUmakefile
src/Makefile.global
src/backend/port/Makefile
+ src/ant.cfg
],
[
# Update timestamp for pg_config.h (see Makefile.global)
Index: contrib/retep/build.xml
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/retep/build.xml,v
retrieving revision 1.8
diff -u -c -r1.8 build.xml
*** contrib/retep/build.xml 6 Jul 2001 23:07:20 -0000 1.8
--- contrib/retep/build.xml 12 Oct 2001 10:33:39 -0000
***************
*** 19,24 ****
--- 19,27 ----
<property name="package" value="uk/org/retep" />
<property name="jardir" value="jars" />
+ <!-- Load autoconfed properties. -->
+ <property file="${srcdir}../../src/ant.cfg" />
+
<!-- Some checks used to build dependent on the environment -->
<target name="checks">
<available property="jdk1.2+" classname="java.lang.ThreadLocal" />
Index: src/GNUmakefile.in
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/GNUmakefile.in,v
retrieving revision 1.61
diff -u -c -r1.61 GNUmakefile.in
*** src/GNUmakefile.in 10 Feb 2001 02:31:26 -0000 1.61
--- src/GNUmakefile.in 12 Oct 2001 10:34:36 -0000
***************
*** 40,43 ****
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test $@
! rm -f Makefile.port Makefile.global GNUmakefile
--- 40,43 ----
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test $@
! rm -f Makefile.port Makefile.global GNUmakefile ant.cfg
Index: src/interfaces/jdbc/Makefile
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/Makefile,v
retrieving revision 1.33
diff -u -c -r1.33 Makefile
*** src/interfaces/jdbc/Makefile 6 Jul 2001 23:07:20 -0000 1.33
--- src/interfaces/jdbc/Makefile 16 Oct 2001 13:40:57 -0000
***************
*** 12,31 ****
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
- majorversion := $(shell echo $(VERSION) | sed 's/^\([0-9][0-9]*\)\..*$$/\1/')
- minorversion := $(shell echo $(VERSION) | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*$$/\1/')
-
- properties := -Dmajor=$(majorversion) -Dminor=$(minorversion) \
- -Dfullversion=$(VERSION) \
- -Ddef_pgport=$(DEF_PGPORT)
-
all:
! $(ANT) -buildfile $(srcdir)/build.xml all \
! $(properties)
install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir) $(properties)
installdirs:
$(mkinstalldirs) $(javadir)
--- 12,23 ----
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
all:
! $(ANT) -buildfile $(srcdir)/build.xml all
install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir)
installdirs:
$(mkinstalldirs) $(javadir)
Index: src/interfaces/jdbc/build.xml
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/build.xml,v
retrieving revision 1.18
diff -u -c -r1.18 build.xml
*** src/interfaces/jdbc/build.xml 23 Sep 2001 04:11:14 -0000 1.18
--- src/interfaces/jdbc/build.xml 12 Oct 2001 10:32:25 -0000
***************
*** 21,26 ****
--- 21,29 ----
<property name="package" value="org/postgresql" />
+ <!-- Load autoconfed properties. -->
+ <property file="${srcdir}/../../ant.cfg" />
+
<!--
This is a simpler method than utils.CheckVersion
It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is
*** /dev/null Thu Jan 1 03:00:00 1970
--- src/ant.cfg.in Tue Oct 16 15:49:05 2001
***************
*** 0 ****
--- 1,8 ----
+ # Properties file for Ant
+
+ fullversion = @VERSION@
+ major = @VERSION_MAJOR@
+ minor = @VERSION_MINOR@
+ def_pgport = @default_port@
+ install.directory = @JAVA_DEST@
+
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
I dusted a old patch that integrates Ant better with
autoconf. It creates a file src/ant.cfg.in to pass
autoconf parameters to Ant. Now Ant can be used directly,
without going through Makefile.'install.directory' is still passed in Makefile to keep
DESTDIR working.--
markoIndex: configure.in =================================================================== RCS file: /opt/cvs/pgsql/pgsql/configure.in,v retrieving revision 1.146 diff -u -c -r1.146 configure.in *** configure.in 16 Oct 2001 10:09:15 -0000 1.146 --- configure.in 16 Oct 2001 13:37:46 -0000 *************** *** 32,37 **** --- 32,42 ---- AC_SUBST(VERSION) AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")+ VERSION_MAJOR=`echo $VERSION | sed 's/^\([[0-9]][[0-9]]*\)\..*\$/\1/'` + VERSION_MINOR=`echo $VERSION | sed 's/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*\$/\1/'` + AC_SUBST(VERSION_MAJOR) + AC_SUBST(VERSION_MINOR) + unset CDPATHAC_CANONICAL_HOST *************** *** 411,416 **** --- 416,424 ---- [AC_MSG_RESULT(no)]) AC_SUBST(with_java)+ JAVA_DEST=$prefix/share/java + AC_SUBST(JAVA_DEST) + dnl A note on the Kerberos and OpenSSL options: dnl dnl The user can give an argument to the option in order the specify *************** *** 1218,1223 **** --- 1226,1232 ---- src/GNUmakefile src/Makefile.global src/backend/port/Makefile + src/ant.cfg ], [ # Update timestamp for pg_config.h (see Makefile.global) Index: contrib/retep/build.xml =================================================================== RCS file: /opt/cvs/pgsql/pgsql/contrib/retep/build.xml,v retrieving revision 1.8 diff -u -c -r1.8 build.xml *** contrib/retep/build.xml 6 Jul 2001 23:07:20 -0000 1.8 --- contrib/retep/build.xml 12 Oct 2001 10:33:39 -0000 *************** *** 19,24 **** --- 19,27 ---- <property name="package" value="uk/org/retep" /> <property name="jardir" value="jars" />+ <!-- Load autoconfed properties. --> + <property file="${srcdir}../../src/ant.cfg" /> + <!-- Some checks used to build dependent on the environment --> <target name="checks"> <available property="jdk1.2+" classname="java.lang.ThreadLocal" /> Index: src/GNUmakefile.in =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/GNUmakefile.in,v retrieving revision 1.61 diff -u -c -r1.61 GNUmakefile.in *** src/GNUmakefile.in 10 Feb 2001 02:31:26 -0000 1.61 --- src/GNUmakefile.in 12 Oct 2001 10:34:36 -0000 *************** *** 40,43 **** -$(MAKE) -C bin $@ -$(MAKE) -C pl $@ -$(MAKE) -C test $@ ! rm -f Makefile.port Makefile.global GNUmakefile --- 40,43 ---- -$(MAKE) -C bin $@ -$(MAKE) -C pl $@ -$(MAKE) -C test $@ ! rm -f Makefile.port Makefile.global GNUmakefile ant.cfg Index: src/interfaces/jdbc/Makefile =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/Makefile,v retrieving revision 1.33 diff -u -c -r1.33 Makefile *** src/interfaces/jdbc/Makefile 6 Jul 2001 23:07:20 -0000 1.33 --- src/interfaces/jdbc/Makefile 16 Oct 2001 13:40:57 -0000 *************** *** 12,31 **** top_builddir = ../../.. include $(top_builddir)/src/Makefile.global- majorversion := $(shell echo $(VERSION) | sed 's/^\([0-9][0-9]*\)\..*$$/\1/')
- minorversion := $(shell echo $(VERSION) | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*$$/\1/')
-
- properties := -Dmajor=$(majorversion) -Dminor=$(minorversion) \
- -Dfullversion=$(VERSION) \
- -Ddef_pgport=$(DEF_PGPORT)
-
all:
! $(ANT) -buildfile $(srcdir)/build.xml all \
! $(properties)install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir) $(properties)installdirs: $(mkinstalldirs) $(javadir) --- 12,23 ---- top_builddir = ../../.. include $(top_builddir)/src/Makefile.globalall:
! $(ANT) -buildfile $(srcdir)/build.xml allinstall: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir)installdirs: $(mkinstalldirs) $(javadir) Index: src/interfaces/jdbc/build.xml =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/build.xml,v retrieving revision 1.18 diff -u -c -r1.18 build.xml *** src/interfaces/jdbc/build.xml 23 Sep 2001 04:11:14 -0000 1.18 --- src/interfaces/jdbc/build.xml 12 Oct 2001 10:32:25 -0000 *************** *** 21,26 **** --- 21,29 ---- <property name="package" value="org/postgresql" />+ <!-- Load autoconfed properties. --> + <property file="${srcdir}/../../ant.cfg" /> + <!-- This is a simpler method than utils.CheckVersion It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is *** /dev/null Thu Jan 1 03:00:00 1970 --- src/ant.cfg.in Tue Oct 16 15:49:05 2001 *************** *** 0 **** --- 1,8 ---- + # Properties file for Ant + + fullversion = @VERSION@ + major = @VERSION_MAJOR@ + minor = @VERSION_MINOR@ + def_pgport = @default_port@ + install.directory = @JAVA_DEST@ +---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.
By requiring ANT, we provide yet another hurdle for someone wanting to
use JDBC with postgres. I would prefer that the build environment be
the same for the database as for the jdbc code.
Anything that makes it more difficult to download the source and get
going with it is a negative in my opinion. And from my perspective
requiring the download of an additional tool (ANT in this case) makes it
more difficult.
I already know that some binary distributions of postgres do not include
JDBC simply because it is too complex to get ANT installed in their
build environment. (complex perhaps isn't the right word, but it is more
work than they are willing to put in for a small feature of postgres).
thanks,
--Barry
Marko Kreen wrote:
Show quoted text
I dusted a old patch that integrates Ant better with
autoconf. It creates a file src/ant.cfg.in to pass
autoconf parameters to Ant. Now Ant can be used directly,
without going through Makefile.'install.directory' is still passed in Makefile to keep
DESTDIR working.
Marko Kreen writes:
*************** *** 411,416 **** --- 416,424 ---- [AC_MSG_RESULT(no)]) AC_SUBST(with_java)+ JAVA_DEST=$prefix/share/java + AC_SUBST(JAVA_DEST) + dnl A note on the Kerberos and OpenSSL options: dnl dnl The user can give an argument to the option in order the specify
References to $prefix don't work (always) in configure. Plus, (even if
they did), this would break 'make install prefix=somewhere'.
Index: contrib/retep/build.xml =================================================================== RCS file: /opt/cvs/pgsql/pgsql/contrib/retep/build.xml,v retrieving revision 1.8 diff -u -c -r1.8 build.xml *** contrib/retep/build.xml 6 Jul 2001 23:07:20 -0000 1.8 --- contrib/retep/build.xml 12 Oct 2001 10:33:39 -0000 *************** *** 19,24 **** --- 19,27 ---- <property name="package" value="uk/org/retep" /> <property name="jardir" value="jars" />+ <!-- Load autoconfed properties. --> + <property file="${srcdir}../../src/ant.cfg" /> + <!-- Some checks used to build dependent on the environment --> <target name="checks"> <available property="jdk1.2+" classname="java.lang.ThreadLocal" />
This is obviously a typo.
Plus, I'm not sure whether this would work when building outside the
source tree, since ant.cfg is not going to be in the source tree.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
On Wed, Oct 17, 2001 at 10:35:07PM +0200, Peter Eisentraut wrote:
Marko Kreen writes:
Index: configure.in + JAVA_DEST=$prefix/share/java + AC_SUBST(JAVA_DEST)References to $prefix don't work (always) in configure. Plus, (even if
they did), this would break 'make install prefix=somewhere'.
The JAVA_DEST goes into ant.cfg. It is replaced in configure
end-phase. It tells Ant-only compiling/installing the final
directory and I cant use make variables there.
But when going through 'make', the install.directory
is replaced _in any case_ with what make uses. So the patch
does not change anything how 'make install' currently works.
(Parameters from command line override parameters from properties
files in Ant)
Index: contrib/retep/build.xml + <!-- Load autoconfed properties. --> + <property file="${srcdir}../../src/ant.cfg" />This is obviously a typo.
Heh. Sorry. Attached is fixed patch.
Plus, I'm not sure whether this would work when building outside the
source tree, since ant.cfg is not going to be in the source tree.
Well, does it work currently? The parameters I put into ant.cfg
are currently fetched from Makefile.global... Only thing I
changed is that now Ant does not need to be called from Makefile
to get those parameters.
Any other problems?
--
marko
Index: configure.in
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/configure.in,v
retrieving revision 1.146
diff -u -c -r1.146 configure.in
*** configure.in 16 Oct 2001 10:09:15 -0000 1.146
--- configure.in 16 Oct 2001 13:37:46 -0000
***************
*** 32,37 ****
--- 32,42 ----
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")
+ VERSION_MAJOR=`echo $VERSION | sed 's/^\([[0-9]][[0-9]]*\)\..*\$/\1/'`
+ VERSION_MINOR=`echo $VERSION | sed 's/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*\$/\1/'`
+ AC_SUBST(VERSION_MAJOR)
+ AC_SUBST(VERSION_MINOR)
+
unset CDPATH
AC_CANONICAL_HOST
***************
*** 411,416 ****
--- 416,424 ----
[AC_MSG_RESULT(no)])
AC_SUBST(with_java)
+ JAVA_DEST=$prefix/share/java
+ AC_SUBST(JAVA_DEST)
+
dnl A note on the Kerberos and OpenSSL options:
dnl
dnl The user can give an argument to the option in order the specify
***************
*** 1218,1223 ****
--- 1226,1232 ----
src/GNUmakefile
src/Makefile.global
src/backend/port/Makefile
+ src/ant.cfg
],
[
# Update timestamp for pg_config.h (see Makefile.global)
Index: contrib/retep/build.xml
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/retep/build.xml,v
retrieving revision 1.8
diff -u -c -r1.8 build.xml
*** contrib/retep/build.xml 6 Jul 2001 23:07:20 -0000 1.8
--- contrib/retep/build.xml 12 Oct 2001 10:33:39 -0000
***************
*** 19,24 ****
--- 19,27 ----
<property name="package" value="uk/org/retep" />
<property name="jardir" value="jars" />
+ <!-- Load autoconfed properties. -->
+ <property file="${srcdir}/../../src/ant.cfg" />
+
<!-- Some checks used to build dependent on the environment -->
<target name="checks">
<available property="jdk1.2+" classname="java.lang.ThreadLocal" />
Index: src/GNUmakefile.in
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/GNUmakefile.in,v
retrieving revision 1.61
diff -u -c -r1.61 GNUmakefile.in
*** src/GNUmakefile.in 10 Feb 2001 02:31:26 -0000 1.61
--- src/GNUmakefile.in 12 Oct 2001 10:34:36 -0000
***************
*** 40,43 ****
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test $@
! rm -f Makefile.port Makefile.global GNUmakefile
--- 40,43 ----
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test $@
! rm -f Makefile.port Makefile.global GNUmakefile ant.cfg
Index: src/interfaces/jdbc/Makefile
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/Makefile,v
retrieving revision 1.33
diff -u -c -r1.33 Makefile
*** src/interfaces/jdbc/Makefile 6 Jul 2001 23:07:20 -0000 1.33
--- src/interfaces/jdbc/Makefile 16 Oct 2001 13:40:57 -0000
***************
*** 12,31 ****
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
- majorversion := $(shell echo $(VERSION) | sed 's/^\([0-9][0-9]*\)\..*$$/\1/')
- minorversion := $(shell echo $(VERSION) | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*$$/\1/')
-
- properties := -Dmajor=$(majorversion) -Dminor=$(minorversion) \
- -Dfullversion=$(VERSION) \
- -Ddef_pgport=$(DEF_PGPORT)
-
all:
! $(ANT) -buildfile $(srcdir)/build.xml all \
! $(properties)
install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir) $(properties)
installdirs:
$(mkinstalldirs) $(javadir)
--- 12,23 ----
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
all:
! $(ANT) -buildfile $(srcdir)/build.xml all
install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir)
installdirs:
$(mkinstalldirs) $(javadir)
Index: src/interfaces/jdbc/build.xml
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/build.xml,v
retrieving revision 1.18
diff -u -c -r1.18 build.xml
*** src/interfaces/jdbc/build.xml 23 Sep 2001 04:11:14 -0000 1.18
--- src/interfaces/jdbc/build.xml 12 Oct 2001 10:32:25 -0000
***************
*** 21,26 ****
--- 21,29 ----
<property name="package" value="org/postgresql" />
+ <!-- Load autoconfed properties. -->
+ <property file="${srcdir}/../../ant.cfg" />
+
<!--
This is a simpler method than utils.CheckVersion
It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is
*** /dev/null Thu Jan 1 03:00:00 1970
--- src/ant.cfg.in Tue Oct 16 15:49:05 2001
***************
*** 0 ****
--- 1,8 ----
+ # Properties file for Ant
+
+ fullversion = @VERSION@
+ major = @VERSION_MAJOR@
+ minor = @VERSION_MINOR@
+ def_pgport = @default_port@
+ install.directory = @JAVA_DEST@
+
On Wed, Oct 17, 2001 at 01:23:13PM -0700, Barry Lind wrote:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.By requiring ANT, we provide yet another hurdle for someone wanting to
use JDBC with postgres. I would prefer that the build environment be
the same for the database as for the jdbc code.Anything that makes it more difficult to download the source and get
going with it is a negative in my opinion. And from my perspective
requiring the download of an additional tool (ANT in this case) makes it
more difficult.
I have no strong feelings about current situation, I simply made
it more flexible. About changing it, you should consult JDBC
maintainers first, maybe they have some good reason why its
so...
I already know that some binary distributions of postgres do not include
JDBC simply because it is too complex to get ANT installed in their
build environment. (complex perhaps isn't the right word, but it is more
work than they are willing to put in for a small feature of postgres).
JDBC driver is simply a .jar file, I think it should be more
easily downloadable from main website. (JDBC1/JDBC2 edition...)
--
marko
I agree with Barry Lind that there is no reason for us to use Ant at
all. Can you work on a patch that uses our standard Make machanism?
Patch rejected.
---------------------------------------------------------------------------
I dusted a old patch that integrates Ant better with
autoconf. It creates a file src/ant.cfg.in to pass
autoconf parameters to Ant. Now Ant can be used directly,
without going through Makefile.'install.directory' is still passed in Makefile to keep
DESTDIR working.--
markoIndex: configure.in =================================================================== RCS file: /opt/cvs/pgsql/pgsql/configure.in,v retrieving revision 1.146 diff -u -c -r1.146 configure.in *** configure.in 16 Oct 2001 10:09:15 -0000 1.146 --- configure.in 16 Oct 2001 13:37:46 -0000 *************** *** 32,37 **** --- 32,42 ---- AC_SUBST(VERSION) AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")+ VERSION_MAJOR=`echo $VERSION | sed 's/^\([[0-9]][[0-9]]*\)\..*\$/\1/'` + VERSION_MINOR=`echo $VERSION | sed 's/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*\$/\1/'` + AC_SUBST(VERSION_MAJOR) + AC_SUBST(VERSION_MINOR) + unset CDPATHAC_CANONICAL_HOST *************** *** 411,416 **** --- 416,424 ---- [AC_MSG_RESULT(no)]) AC_SUBST(with_java)+ JAVA_DEST=$prefix/share/java + AC_SUBST(JAVA_DEST) + dnl A note on the Kerberos and OpenSSL options: dnl dnl The user can give an argument to the option in order the specify *************** *** 1218,1223 **** --- 1226,1232 ---- src/GNUmakefile src/Makefile.global src/backend/port/Makefile + src/ant.cfg ], [ # Update timestamp for pg_config.h (see Makefile.global) Index: contrib/retep/build.xml =================================================================== RCS file: /opt/cvs/pgsql/pgsql/contrib/retep/build.xml,v retrieving revision 1.8 diff -u -c -r1.8 build.xml *** contrib/retep/build.xml 6 Jul 2001 23:07:20 -0000 1.8 --- contrib/retep/build.xml 12 Oct 2001 10:33:39 -0000 *************** *** 19,24 **** --- 19,27 ---- <property name="package" value="uk/org/retep" /> <property name="jardir" value="jars" />+ <!-- Load autoconfed properties. --> + <property file="${srcdir}../../src/ant.cfg" /> + <!-- Some checks used to build dependent on the environment --> <target name="checks"> <available property="jdk1.2+" classname="java.lang.ThreadLocal" /> Index: src/GNUmakefile.in =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/GNUmakefile.in,v retrieving revision 1.61 diff -u -c -r1.61 GNUmakefile.in *** src/GNUmakefile.in 10 Feb 2001 02:31:26 -0000 1.61 --- src/GNUmakefile.in 12 Oct 2001 10:34:36 -0000 *************** *** 40,43 **** -$(MAKE) -C bin $@ -$(MAKE) -C pl $@ -$(MAKE) -C test $@ ! rm -f Makefile.port Makefile.global GNUmakefile --- 40,43 ---- -$(MAKE) -C bin $@ -$(MAKE) -C pl $@ -$(MAKE) -C test $@ ! rm -f Makefile.port Makefile.global GNUmakefile ant.cfg Index: src/interfaces/jdbc/Makefile =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/Makefile,v retrieving revision 1.33 diff -u -c -r1.33 Makefile *** src/interfaces/jdbc/Makefile 6 Jul 2001 23:07:20 -0000 1.33 --- src/interfaces/jdbc/Makefile 16 Oct 2001 13:40:57 -0000 *************** *** 12,31 **** top_builddir = ../../.. include $(top_builddir)/src/Makefile.global- majorversion := $(shell echo $(VERSION) | sed 's/^\([0-9][0-9]*\)\..*$$/\1/')
- minorversion := $(shell echo $(VERSION) | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*$$/\1/')
-
- properties := -Dmajor=$(majorversion) -Dminor=$(minorversion) \
- -Dfullversion=$(VERSION) \
- -Ddef_pgport=$(DEF_PGPORT)
-
all:
! $(ANT) -buildfile $(srcdir)/build.xml all \
! $(properties)install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir) $(properties)installdirs: $(mkinstalldirs) $(javadir) --- 12,23 ---- top_builddir = ../../.. include $(top_builddir)/src/Makefile.globalall:
! $(ANT) -buildfile $(srcdir)/build.xml allinstall: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir)installdirs: $(mkinstalldirs) $(javadir) Index: src/interfaces/jdbc/build.xml =================================================================== RCS file: /opt/cvs/pgsql/pgsql/src/interfaces/jdbc/build.xml,v retrieving revision 1.18 diff -u -c -r1.18 build.xml *** src/interfaces/jdbc/build.xml 23 Sep 2001 04:11:14 -0000 1.18 --- src/interfaces/jdbc/build.xml 12 Oct 2001 10:32:25 -0000 *************** *** 21,26 **** --- 21,29 ---- <property name="package" value="org/postgresql" />+ <!-- Load autoconfed properties. --> + <property file="${srcdir}/../../ant.cfg" /> + <!-- This is a simpler method than utils.CheckVersion It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is *** /dev/null Thu Jan 1 03:00:00 1970 --- src/ant.cfg.in Tue Oct 16 15:49:05 2001 *************** *** 0 **** --- 1,8 ---- + # Properties file for Ant + + fullversion = @VERSION@ + major = @VERSION_MAJOR@ + minor = @VERSION_MINOR@ + def_pgport = @default_port@ + install.directory = @JAVA_DEST@ +---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Wed, Oct 17, 2001 at 01:23:13PM -0700, Barry Lind wrote:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.By requiring ANT, we provide yet another hurdle for someone wanting to
use JDBC with postgres. I would prefer that the build environment be
the same for the database as for the jdbc code.Anything that makes it more difficult to download the source and get
going with it is a negative in my opinion. And from my perspective
requiring the download of an additional tool (ANT in this case) makes it
more difficult.I have no strong feelings about current situation, I simply made
it more flexible. About changing it, you should consult JDBC
maintainers first, maybe they have some good reason why its
so...
Barry and Dave are the jdbc maintainers now and I think there is general
consensus that we want to get away from Ant if possible.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Given that ant is (or is becoming) the defacto standard for building
java apps I am reluctant to remove it. A number of projects simply
include the ant jar in the download.
Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Barry Lind
Sent: October 17, 2001 4:23 PM
To: Marko Kreen
Cc: pgsql-patches@postgresql.org; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] [PATCHES] Ant configuration
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.
By requiring ANT, we provide yet another hurdle for someone wanting to
use JDBC with postgres. I would prefer that the build environment be
the same for the database as for the jdbc code.
Anything that makes it more difficult to download the source and get
going with it is a negative in my opinion. And from my perspective
requiring the download of an additional tool (ANT in this case) makes it
more difficult.
I already know that some binary distributions of postgres do not include
JDBC simply because it is too complex to get ANT installed in their
build environment. (complex perhaps isn't the right word, but it is more
work than they are willing to put in for a small feature of postgres).
thanks,
--Barry
Marko Kreen wrote:
I dusted a old patch that integrates Ant better with autoconf. It
creates a file src/ant.cfg.in to pass autoconf parameters to Ant. Now
Ant can be used directly, without going through Makefile.
'install.directory' is still passed in Makefile to keep DESTDIR
working.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Marko,
I am one of the jdbc maintainers. That is why I posted this to the list
as I did. I wanted to see if there was concensus on this issue one way
or the other. In looking at your patch, I don't have any problems with
it technically, but I would hate to have it applied, only to remove the
entire functionality in the future (although I guess that doesn't really
hurt anything).
I do appreciate you taking your time to put this patch together and
submitting it. That is how open source projects work after all. I just
want to make sure there is agreement that this is the right direction
people want the jdbc driver to go.
thanks,
--Barry
Marko Kreen wrote:
Show quoted text
On Wed, Oct 17, 2001 at 01:23:13PM -0700, Barry Lind wrote:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.By requiring ANT, we provide yet another hurdle for someone wanting to
use JDBC with postgres. I would prefer that the build environment be
the same for the database as for the jdbc code.Anything that makes it more difficult to download the source and get
going with it is a negative in my opinion. And from my perspective
requiring the download of an additional tool (ANT in this case) makes it
more difficult.I have no strong feelings about current situation, I simply made
it more flexible. About changing it, you should consult JDBC
maintainers first, maybe they have some good reason why its
so...I already know that some binary distributions of postgres do not include
JDBC simply because it is too complex to get ANT installed in their
build environment. (complex perhaps isn't the right word, but it is more
work than they are willing to put in for a small feature of postgres).JDBC driver is simply a .jar file, I think it should be more
easily downloadable from main website. (JDBC1/JDBC2 edition...)
On Wed, Oct 17, 2001 at 07:37:27PM -0700, Barry Lind wrote:
I am one of the jdbc maintainers. That is why I posted this to the list
as I did. I wanted to see if there was concensus on this issue one way
or the other. In looking at your patch, I don't have any problems with
it technically, but I would hate to have it applied, only to remove the
entire functionality in the future (although I guess that doesn't really
hurt anything).
Ok.
I do appreciate you taking your time to put this patch together and
submitting it. That is how open source projects work after all. I just
want to make sure there is agreement that this is the right direction
people want the jdbc driver to go.
No problem.
About Ant->Makefile thing I still cant convince myself that this is
a project worth doing. Ant's only downside is that user needs
to set it up separately and its not a very easy thing to do.
And at the time of Ant 1.1 this was a real problem (for me at
least) as Ant had rather obscure compatibility problems with
various XML libs and finally I decided that 'Ant sucks'.
But with Ant 1.3/1.4 they seems to have that kind of a problems
under control and at least I have not had any problems with it
since then.
But it seems to me that Ant has a positive side too:
* People with Java background probably know Ant better that
'make'. Ant seems to become 'build tool of choice' in
Java world.
* When Ant is set up, it takes care of all local Java
environment, so we in PostgreSQL source do not need
to bother about it.
* In Ant the build file will be much less complex
than a Makefile with same functionality. And same
time in Ant it is much easier to check local
Java internal setup.
Basically I am able to do it, I have managed moderately
sized Java project with Makefile, but it was not nice.
You could check JDBC Makefile from Jan 2001 - it is quite
messy.
--
marko
Barry Lind writes:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.
The use of Ant originally seemed attractive because it would solve the
detection of the jdk version, the portable invocation of the compiler, and
the dependency generation. However, I must currently consider this
experiment a failure, because for each problem Ant solves it introduces a
load of worse problems into the system. Thus, if we can agree to work out
a configure/make-based system for the next release I would be very much
for it.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
* Peter Eisentraut <peter_e@gmx.net> wrote:
|
| The use of Ant originally seemed attractive because it would solve the
| detection of the jdk version, the portable invocation of the compiler, and
| the dependency generation. However, I must currently consider this
| experiment a failure, because for each problem Ant solves it introduces a
| load of worse problems into the system. Thus, if we can agree to work out
| a configure/make-based system for the next release I would be very much
| for it.
What are the pro and cons for each approach ?
Would it be unfeasible to include the ant binary in the distribution or is
there other problems as well ?
If we use make I guess we could use jikes to generate dependency files for
make, but that does give use much as we then will require jikes for
developers. Another alternative is make clean or manual approaches.
I would say that we have two primary concerns here :
1. A build process that JDBC developers find convenient and productive
to work with.
2. A build process that the users find convenient. Downloading things
like Ant is not helping them.
--
Gunnar R�nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
Marko,
But it seems to me that Ant has a positive side too:
I agree that there are positive reasons to use Ant (that is why it was
done in the first place). It is just that in retrospect, I don't
believe the pluses outweigh the minuses.
* People with Java background probably know Ant better that
'make'. Ant seems to become 'build tool of choice' in
Java world.
Perhaps, but I'm not convinced that either of these arguments is true.
I have seen make used by more projects than ant, and a developer
building postgres from source, certainly needs to be familiar with make.
* When Ant is set up, it takes care of all local Java
environment, so we in PostgreSQL source do not need
to bother about it.
I'm not sure what you mean here. Can you provide an example?
* In Ant the build file will be much less complex
than a Makefile with same functionality. And same
time in Ant it is much easier to check local
Java internal setup.
I agree that this is true, but I think a much better job can be done to
minimize the added complexity. I have looked at the old makefile and it
was quite complex. But I have ideas on how to reduce that complexity.
Basically I want to trade off a little more complexity on the part of
the developers of jdbc, for less complexity for users to install and build.
thanks,
--Barry
The one issue I have with a non ant based build system is that it makes
it difficult to build the driver on a windows machine.
Currently I can build the driver on windows without using cygwin
What problems does ant present?
Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Peter Eisentraut
Sent: October 18, 2001 5:04 PM
To: Barry Lind
Cc: Marko Kreen; pgsql-patches@postgresql.org; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] [PATCHES] Ant configuration
Barry Lind writes:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.
The use of Ant originally seemed attractive because it would solve the
detection of the jdk version, the portable invocation of the compiler,
and the dependency generation. However, I must currently consider this
experiment a failure, because for each problem Ant solves it introduces
a load of worse problems into the system. Thus, if we can agree to work
out a configure/make-based system for the next release I would be very
much for it.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Barry Lind writes:
I don't like this patch. If anything I think we should remove the
dependency on ANT, not remove the dependency on make.The use of Ant originally seemed attractive because it would solve the
detection of the jdk version, the portable invocation of the compiler, and
the dependency generation. However, I must currently consider this
experiment a failure, because for each problem Ant solves it introduces a
load of worse problems into the system. Thus, if we can agree to work out
a configure/make-based system for the next release I would be very much
for it.
I think I can safely at to TODO:
JDBC
o Move from Ant to Make builds
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
* In Ant the build file will be much less complex
than a Makefile with same functionality. And same
time in Ant it is much easier to check local
Java internal setup.I agree that this is true, but I think a much better job can be done to
minimize the added complexity. I have looked at the old makefile and it
was quite complex. But I have ideas on how to reduce that complexity.Basically I want to trade off a little more complexity on the part of
the developers of jdbc, for less complexity for users to install and build.
I don't mind either way really, but I don't see why the makefile should
need to be so complex. One option is also since Postgresql uses configure
to build, we can use configure to help us detect whatever we need to
if --with-java is turned on and set suitable options/paths etc in the makefile.
That said I haven't really looked at the current build process for the driver.
Tom.
--
Thomas O'Dowd. - Nooping - http://nooper.com
tom@nooper.com - Testing - http://nooper.co.jp/labs
* "Dave Cramer" <Dave@micro-automation.net> wrote:
|
| The one issue I have with a non ant based build system is that it makes
| it difficult to build the driver on a windows machine.
I think is a valid concern, since a lot of clients presumably will be running
on other architectures.
Maybe a twofold solution ?
1. a very simple make file that doesn't care about dependencies and such.
2. ant as an alternative for developers and users of other
platforms.
And I think more and more projects are migrating towards using Ant. Even
I have done so after 10 years of using make ;-)
--
Gunnar R�nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
* Bruce Momjian <pgman@candle.pha.pa.us> wrote:
|
| I think I can safely at to TODO:
|
| JDBC
| o Move from Ant to Make builds
I don't think there is consesus over at the JDBC list yet. We need to get
all the pros/cons for both solutions on the table first. Make is not
neccesarily better than Ant, I would think a combination would work best.
Because then Mac and Windows users could use Ant to compile their JDBC
driver, while the compilation of the server on Unices would work
seamlessly.
--
Gunnar R�nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
OK, TODO item removed.
* Bruce Momjian <pgman@candle.pha.pa.us> wrote:
|
| I think I can safely at to TODO:
|
| JDBC
| o Move from Ant to Make buildsI don't think there is consesus over at the JDBC list yet. We need to get
all the pros/cons for both solutions on the table first. Make is not
neccesarily better than Ant, I would think a combination would work best.
Because then Mac and Windows users could use Ant to compile their JDBC
driver, while the compilation of the server on Unices would work
seamlessly.--
Gunnar R?nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Import Notes
Reply to msg id not found: m2hesvrf1u.fsf@smaug.polygnosis.com=?ISO-8859-1?Q?from_Gunnar_R=F8nning_at_Oct_19=2C_2001_02=3A26=3A53_pm?= | Resolved by subject fallback