Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> 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
  [EMAIL PROTECTED]               |  (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
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to