OBJS += win32.o pgsleep.o libpqrc.o
libpqrc.o: libpq.rc
- windres -i libpq.rc -o libpqrc.o
+ windres -i $< -o $@
ifeq ($(enable_thread_safety), yes)
OBJS += pthread-win32.o
SHLIB_EXPORTS = exports.txt
-all: $(srcdir)/libpq.rc all-lib
+all: $(srcdir)/libpq-dist.rc all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
rm -f $@ && $(LN_S) $< .
-distprep: $(srcdir)/libpq.rc
+distprep: $(srcdir)/libpq-dist.rc
-# 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' | sed 's/^0*//'`'/' < $< > $@
+libpq.rc $(srcdir)/libpq-dist.rc: libpq.rc.in
+ sed -e 's/\(VERSION.*\),0 *$$/\1,'`date '+%y%j' | sed 's/^0*//'`'/' $< >$@
+
+# Depend on Makefile.global to force rebuild on re-run of configure.
+# (But libpq-dist.rc is shipped in the distribution for shell-less
+# installations and is only updated by distprep.)
+libpq.rc: $(top_builddir)/src/Makefile.global
fe-connect.o: fe-connect.c $(top_builddir)/src/port/pg_config_paths.h
rm -f '$(DESTDIR)$(includedir)/libpq-fe.h' '$(DESTDIR)$(includedir_internal)/libpq-int.h' '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h' '$(DESTDIR)$(datadir)/pg_service.conf.sample'
clean distclean: clean-lib
- rm -f $(OBJS) pg_config_paths.h crypt.c getaddrinfo.c inet_aton.c noblock.c open.c pgstrcasecmp.c snprintf.c strerror.c strlcpy.c thread.c md5.c ip.c encnames.c wchar.c win32error.c pgsleep.c pthread.h
+ rm -f $(OBJS) pg_config_paths.h crypt.c getaddrinfo.c inet_aton.c noblock.c open.c pgstrcasecmp.c snprintf.c strerror.c strlcpy.c thread.c md5.c ip.c encnames.c wchar.c win32error.c pgsleep.c pthread.h libpq.rc
# Might be left over from a Win32 client-only build
rm -f pg_config_paths.h
maintainer-clean: distclean maintainer-clean-lib
- rm -f $(srcdir)/libpq.rc
+ rm -f $(srcdir)/libpq-dist.rc
<<
implib -w "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
-"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq.rc
- $(RSC) $(RSC_PROJ) libpq.rc
+"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
+ $(RSC) $(RSC_PROJ) libpq-dist.rc
"$(OUTDIR)\blibpq.lib": $(LIB32_OBJS)
$(LIB32) $@ @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
-"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq.rc
- $(RSC) $(RSC_PROJ) libpq.rc
+"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
+ $(RSC) $(RSC_PROJ) libpq-dist.rc
"$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(INTDIR)\libpq.res"