Skip site navigation (1) Skip section navigation (2)

Re: Ant configuration

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Ant configuration
Date: 2001-10-17 22:31:34
Message-ID: 20011018003134.A4062@l-t.ee (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-patches
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@
+ 

In response to

pgsql-patches by date

Next:From: Stephen Robert NorrisDate: 2001-10-17 22:46:27
Subject: Patch to fix memory leak in fetch in Python interface.
Previous:From: Peter EisentrautDate: 2001-10-17 20:35:07
Subject: Re: Ant configuration

pgsql-jdbc by date

Next:From: Marko KreenDate: 2001-10-17 23:27:45
Subject: Re: [PATCHES] Ant configuration
Previous:From: Joseph ShraibmanDate: 2001-10-17 21:35:42
Subject: Re: JDBC 2 ResultSet and cursors

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group