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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [PATCHES] Patch to add version numbers to


  • From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
  • To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
  • Subject: Re: [PATCHES] Patch to add version numbers to
  • Date: Thu, 16 Dec 2004 20:44:52 -0500 (EST)
  • Message-id: <200412170144(dot)iBH1iqn10156(at)candle(dot)pha(dot)pa(dot)us>

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > + # Force rebuild on re-run of configure
> > + $(srcdir)/libpq.rc: $(top_srcdir)/src/Makefile.global libpq.rc.in
> > + 	sed -e 's/\(VERSION.*\),0 *$$/\1,'`date '+%y%j'`'/' < $< > $@
> 
> Put Makefile.global second, else $< refers to the wrong file.
> Also, it has to be $(top_builddir)/src/Makefile.global, not top_srcdir.
> The comment would probably be more useful if a little more verbose:
> # depend on Makefile.global to force rebuild on re-run of configure

OK, new version attached with adjustments.  I do like the
Makefile.global dependency idea!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.207
diff -c -c -r1.207 Makefile.global.in
*** src/Makefile.global.in	16 Dec 2004 18:13:07 -0000	1.207
--- src/Makefile.global.in	17 Dec 2004 01:41:35 -0000
***************
*** 415,423 ****
  PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
  endif
  win32ver.rc: $(top_builddir)/src/port/win32ver.rc
! 	sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' $(top_builddir)/src/port/win32ver.rc > win32ver.rc
  win32ver.o: $(top_builddir)/src/port/win32ver.rc
! 	sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' $(top_builddir)/src/port/win32ver.rc > win32ver.rc
  	windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include
  	rm -f win32ver.rc
  endif
--- 415,423 ----
  PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
  endif
  win32ver.rc: $(top_builddir)/src/port/win32ver.rc
! 	sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc
  win32ver.o: $(top_builddir)/src/port/win32ver.rc
! 	sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc
  	windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include
  	rm -f win32ver.rc
  endif
Index: src/interfaces/libpq/Makefile
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v
retrieving revision 1.122
diff -c -c -r1.122 Makefile
*** src/interfaces/libpq/Makefile	20 Nov 2004 21:13:06 -0000	1.122
--- src/interfaces/libpq/Makefile	17 Dec 2004 01:41:40 -0000
***************
*** 59,65 ****
  endif
  
  
! all: $(PTHREAD_H_WIN32) def-files all-lib
  
  # Shared library stuff
  include $(top_srcdir)/src/Makefile.shlib
--- 59,65 ----
  endif
  
  
! all: $(PTHREAD_H_WIN32) def-files $(srcdir)/libpq.rc all-lib
  
  # Shared library stuff
  include $(top_srcdir)/src/Makefile.shlib
***************
*** 118,123 ****
--- 118,126 ----
  	echo '; Aliases for MS compatible names' >> $@
  	sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/    \1= _\1/' < $< | sed 's/ *$$//' >> $@
  
+ # depend on Makefile.global to force rebuild on re-run of configure
+ $(srcdir)/libpq.rc: libpq.rc.in $(top_builddir)/src/Makefile.global
+ 	sed -e 's/\(VERSION.*\),0 *$$/\1,'`date '+%y%j'`'/' < $< > $@
  
  ifneq ($(PTHREAD_H_WIN32), "")
  pthread.h: $(top_srcdir)/src/interfaces/libpq/pthread.h.win
Index: src/port/win32ver.rc
===================================================================
RCS file: /cvsroot/pgsql/src/port/win32ver.rc,v
retrieving revision 1.2
diff -c -c -r1.2 win32ver.rc
*** src/port/win32ver.rc	6 Oct 2004 15:23:27 -0000	1.2
--- src/port/win32ver.rc	17 Dec 2004 01:41:40 -0000
***************
*** 2,9 ****
  #include "pg_config.h"
  
  VS_VERSION_INFO VERSIONINFO
!  FILEVERSION    8,0,000,000
!  PRODUCTVERSION 8,0,000,000
   FILEFLAGSMASK  0x17L
   FILEFLAGS      0x0L
   FILEOS         VOS_NT_WINDOWS32
--- 2,9 ----
  #include "pg_config.h"
  
  VS_VERSION_INFO VERSIONINFO
!  FILEVERSION    8,0,0,0
!  PRODUCTVERSION 8,0,0,0
   FILEFLAGSMASK  0x17L
   FILEFLAGS      0x0L
   FILEOS         VOS_NT_WINDOWS32


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group