Re: Ant configuration - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Ant configuration
Date
Msg-id 200110170151.f9H1p2b01218@candle.pha.pa.us
Whole thread Raw
In response to Ant configuration  (Marko Kreen <marko@l-t.ee>)
List pgsql-patches
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.
>
> --
> 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@
> +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
  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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: FW: [HACKERS] Problem on AIX with current
Next
From: Peter Eisentraut
Date:
Subject: Re: Ant configuration