# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.245 2008/10/29 16:06:46 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.254 2009/06/23 03:46:00 tgl Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
# PostgreSQL version number
VERSION = @PACKAGE_VERSION@
+MAJORVERSION = @PG_MAJORVERSION@
# Support for VPATH builds
vpath_build = @vpath_build@
includedir_internal = $(pkgincludedir)/internal
pgxsdir = $(pkglibdir)/pgxs
-sqlmansect_dummy = l
-
##########################################################################
#
have_docbook = @have_docbook@
DOCBOOKSTYLE = @DOCBOOKSTYLE@
COLLATEINDEX = @COLLATEINDEX@
+DOCBOOK2MAN = @DOCBOOK2MAN@
##########################################################################
FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
DTRACE = @DTRACE@
DTRACEFLAGS = @DTRACEFLAGS@
+ZIC = @ZIC@
# Linking
+AR = @AR@
+DLLTOOL = @DLLTOOL@
+DLLWRAP = @DLLWRAP@
LIBS = @LIBS@
LDAP_LIBS_FE = @LDAP_LIBS_FE@
LDAP_LIBS_BE = @LDAP_LIBS_BE@
LDREL = -r
LDOUT = -o
RANLIB = @RANLIB@
+WINDRES = @WINDRES@
X = @EXEEXT@
# Perl
-# quoted for pathname with spaces
-PERL = "@PERL@"
+ifneq (@PERL@,)
+ # quoted to protect pathname with spaces
+ PERL = "@PERL@"
+else
+ PERL = $(missing) perl
+endif
perl_archlibexp = @perl_archlibexp@
perl_privlibexp = @perl_privlibexp@
perl_useshrplib = @perl_useshrplib@
# Name of the "template"
PORTNAME= @PORTNAME@
+build_os = @build_os@
+
host_tuple = @host@
host_os = @host_os@
host_cpu = @host_cpu@
#
# Global targets and rules
+%.i: %.c
+ $(CPP) $(CPPFLAGS) -o $@ $<
+
%.gz: %
$(GZIP) -f --best $<
%.bz2: %
$(BZIP2) -f $<
-ifeq ($(PORTNAME),win32)
-# Build rules to add versioninfo resources to win32 binaries
-WIN32RES += win32ver.o
-ifeq ($(PGFILESHLIB),1)
-PGFTYPE=VFT_DLL
-else
-PGFTYPE=VFT_APP
-endif
-ifneq (,$(PGAPPICON))
-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' | sed 's/^0*//'`';' $(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' | sed 's/^0*//'`';' $(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
-
ifndef PGXS
# Remake Makefile.global from Makefile.global.in if the latter
$(top_builddir)/src/include/stamp-h: $(top_srcdir)/src/include/pg_config.h.in $(top_builddir)/config.status
cd $(top_builddir) && ./config.status src/include/pg_config.h
-# Also remake ecpg_config.h from ecpg_config.h.in if the latter changed. Values in it can
-# only change if pg_config.h has changed, so include this file to its dependencies.
-$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/include/pg_config.h $(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h.in $(top_builddir)/config.status
+# Also remake ecpg_config.h from ecpg_config.h.in if the latter changed, same
+# logic as above.
+$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/interfaces/ecpg/include/stamp-h
+
+ $(top_builddir)/src/interfaces/ecpg/include/stamp-h: $(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h.in $(top_builddir)/config.status
cd $(top_builddir) && ./config.status src/interfaces/ecpg/include/ecpg_config.h
# When configure changes, rerun configure with the same options as