build patch
build patch
От:
Mike Beachy <beachy@marketboy.com>
Дата:
While hacking about on the code, I've made another couple of tweaks to the
build files. They make it possible to use ant exclusively after running a
configure and a 'make build.properties'. The changes don't affect use of
make if you still want to use it.
Change summary:
To build.xml, I added a specification to retrieve properties from
build.properties, a new target called check_driver that makes sure
Driver.java gets regenerated if build.properties or Driver.java.in is newer
than it is, and a new 'clean_all' target that nukes the build.properties
file in addition to the things in the clean target.
To Makefile, I added a new target, build.properties, which creates a
file with the variables lifted from Makefile.global. I dropped the
command line definitions of these variables and made build.properties a
dependency of the targets that needed them.
Patch follows.
Mike
Index: build.xml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
retrieving revision 1.30
diff -c -r1.30 build.xml
*** build.xml 2002/10/20 00:10:55 1.30
--- build.xml 2002/12/10 13:23:49
***************
*** 23,28 ****
--- 23,30 ----
+
+
!
--- 117,137 ----
+
+
+
+
+
+
+
+
!
***************
*** 158,163 ****
--- 169,177 ----
+
+
+
***************
*** 231,236 ****
--- 245,253 ----
+
+
+
Index: Makefile
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v
retrieving revision 1.36
diff -c -r1.36 Makefile
*** Makefile 2002/10/20 02:55:50 1.36
--- Makefile 2002/12/10 13:23:49
***************
*** 15,32 ****
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) \
! -Denable_debug=$(enable_debug)
!
! all:
! $(ANT) -buildfile $(srcdir)/build.xml all \
! $(properties)
! install: installdirs
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir) $(properties)
installdirs:
$(mkinstalldirs) $(javadir)
--- 15,34 ----
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/')
! build.properties: $(top_builddir)/src/Makefile.global
! echo "# This file was created by 'make build.properties'." > build.properties
! echo major=$(majorversion) >> build.properties
! echo minor=$(minorversion) >> build.properties
! echo fullversion=$(VERSION) >> build.properties
! echo def_pgport=$(DEF_PGPORT) >> build.properties
! echo enable_debug=$(enable_debug) >> build.properties
! all: build.properties
! $(ANT) -buildfile $(srcdir)/build.xml all
!
! install: installdirs build.properties
$(ANT) -buildfile $(srcdir)/build.xml install \
! -Dinstall.directory=$(javadir)
installdirs:
$(mkinstalldirs) $(javadir)
***************
*** 36,42 ****
-Dinstall.directory=$(javadir)
clean distclean maintainer-clean:
! $(ANT) -buildfile $(srcdir)/build.xml clean
! check: all
! $(ANT) -buildfile $(srcdir)/build.xml test $(properties)
--- 38,44 ----
-Dinstall.directory=$(javadir)
clean distclean maintainer-clean:
! $(ANT) -buildfile $(srcdir)/build.xml clean_all
! check: build.properties
! $(ANT) -buildfile $(srcdir)/build.xml test
Re: build patch
От:
Fernando Nasser <fnasser@redhat.com>
Дата:
What about adding this new building info the the README file? Regards, Fernando Mike Beachy wrote: > While hacking about on the code, I've made another couple of tweaks to the > build files. They make it possible to use ant exclusively after running a > configure and a 'make build.properties'. The changes don't affect use of > make if you still want to use it. > > Change summary: > > To build.xml, I added a specification to retrieve properties from > build.properties, a new target called check_driver that makes sure > Driver.java gets regenerated if build.properties or Driver.java.in is newer > than it is, and a new 'clean_all' target that nukes the build.properties > file in addition to the things in the clean target. > > To Makefile, I added a new target, build.properties, which creates a > file with the variables lifted from Makefile.global. I dropped the > command line definitions of these variables and made build.properties a > dependency of the targets that needed them. > > Patch follows. > > Mike > > Index: build.xml > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v > retrieving revision 1.30 > diff -c -r1.30 build.xml > *** build.xml 2002/10/20 00:10:55 1.30 > --- build.xml 2002/12/10 13:23:49 > *************** > *** 23,28 **** > --- 23,30 ---- > > > > + > + > > ! > > > > --- 117,137 ---- > > > > + > + > + > + > + > + > + > + > > > ! ! unless="driver.uptodate"> > > > > *************** > *** 158,163 **** > --- 169,177 ---- > > > > + > + > + > > > > *************** > *** 231,236 **** > --- 245,253 ---- > > > > + > + > + > > > > Index: Makefile > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v > retrieving revision 1.36 > diff -c -r1.36 Makefile > *** Makefile 2002/10/20 02:55:50 1.36 > --- Makefile 2002/12/10 13:23:49 > *************** > *** 15,32 **** > 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) \ > ! -Denable_debug=$(enable_debug) > ! > ! all: > ! $(ANT) -buildfile $(srcdir)/build.xml all \ > ! $(properties) > > ! install: installdirs > $(ANT) -buildfile $(srcdir)/build.xml install \ > ! -Dinstall.directory=$(javadir) $(properties) > > installdirs: > $(mkinstalldirs) $(javadir) > --- 15,34 ---- > 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/') > > ! build.properties: $(top_builddir)/src/Makefile.global > ! echo "# This file was created by 'make build.properties'." > build.properties > ! echo major=$(majorversion) >> build.properties > ! echo minor=$(minorversion) >> build.properties > ! echo fullversion=$(VERSION) >> build.properties > ! echo def_pgport=$(DEF_PGPORT) >> build.properties > ! echo enable_debug=$(enable_debug) >> build.properties > > ! all: build.properties > ! $(ANT) -buildfile $(srcdir)/build.xml all > ! > ! install: installdirs build.properties > $(ANT) -buildfile $(srcdir)/build.xml install \ > ! -Dinstall.directory=$(javadir) > > installdirs: > $(mkinstalldirs) $(javadir) > *************** > *** 36,42 **** > -Dinstall.directory=$(javadir) > > clean distclean maintainer-clean: > ! $(ANT) -buildfile $(srcdir)/build.xml clean > > ! check: all > ! $(ANT) -buildfile $(srcdir)/build.xml test $(properties) > --- 38,44 ---- > -Dinstall.directory=$(javadir) > > clean distclean maintainer-clean: > ! $(ANT) -buildfile $(srcdir)/build.xml clean_all > > ! check: build.properties > ! $(ANT) -buildfile $(srcdir)/build.xml test > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9
Re: build patch
От:
Mike Beachy <beachy@marketboy.com>
Дата:
On Tue, Dec 10, 2002 at 12:11:40PM -0500, Fernando Nasser wrote: > What about adding this new building info the the README file? Patch below. Feel free to suggest something else. Index: README =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/README,v retrieving revision 1.12 diff -c -r1.12 README *** README 2002/10/20 00:10:55 1.12 --- README 2002/12/10 18:39:00 *************** *** 32,37 **** --- 32,41 ---- That jar file will contain the driver for _your_ version of the JDK. + If you would like to use ANT directly, first invoke 'make build.properties' + after running the configure script with the java option. This will create a + needed Java properties file from the configured information. + REMEMBER: Once you have compiled the driver, it will work on ALL platforms that support that version of the API. You don't need to build it for each platform.
Re: build patch
От:
Fernando Nasser <fnasser@redhat.com>
Дата:
That is great. Thanks. Mike Beachy wrote: > On Tue, Dec 10, 2002 at 12:11:40PM -0500, Fernando Nasser wrote: > >>What about adding this new building info the the README file? > > > Patch below. Feel free to suggest something else. > > Index: README > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/README,v > retrieving revision 1.12 > diff -c -r1.12 README > *** README 2002/10/20 00:10:55 1.12 > --- README 2002/12/10 18:39:00 > *************** > *** 32,37 **** > --- 32,41 ---- > > That jar file will contain the driver for _your_ version of the JDK. > > + If you would like to use ANT directly, first invoke 'make build.properties' > + after running the configure script with the java option. This will create a > + needed Java properties file from the configured information. > + > REMEMBER: Once you have compiled the driver, it will work on ALL platforms > that support that version of the API. You don't need to build it for each > platform. > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9
Re: build patch
От:
Dave Cramer <Dave@micro-automation.net>
Дата:
All associated patch's applied Thanks Mike! On Tue, 2002-12-10 at 13:40, Mike Beachy wrote: > On Tue, Dec 10, 2002 at 12:11:40PM -0500, Fernando Nasser wrote: > > What about adding this new building info the the README file? > > Patch below. Feel free to suggest something else. > > Index: README > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/README,v > retrieving revision 1.12 > diff -c -r1.12 README > *** README 2002/10/20 00:10:55 1.12 > --- README 2002/12/10 18:39:00 > *************** > *** 32,37 **** > --- 32,41 ---- > > That jar file will contain the driver for _your_ version of the JDK. > > + If you would like to use ANT directly, first invoke 'make build.properties' > + after running the configure script with the java option. This will create a > + needed Java properties file from the configured information. > + > REMEMBER: Once you have compiled the driver, it will work on ALL platforms > that support that version of the API. You don't need to build it for each > platform. > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org -- Dave Cramer