Commit 234c7ce9 authored by Peter Eisentraut's avatar Peter Eisentraut

Derived files that are shipped in the distribution used to be built in the

source directory even for out-of-tree builds.  They are now alsl built in
the build tree.  This should be more convenient for certain developers'
workflows, and shouldn't really break anything else.
parent 0a00c9a8
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.22 2008/08/29 13:02:32 petere Exp $ # $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.23 2009/08/28 20:26:18 petere Exp $
MODULE_big = cube MODULE_big = cube
OBJS= cube.o cubeparse.o OBJS= cube.o cubeparse.o
...@@ -24,23 +24,23 @@ endif ...@@ -24,23 +24,23 @@ endif
# cubescan is compiled as part of cubeparse # cubescan is compiled as part of cubeparse
cubeparse.o: $(srcdir)/cubescan.c cubeparse.o: cubescan.c
$(srcdir)/cubeparse.c: cubeparse.y cubeparse.c: cubeparse.y
ifdef BISON ifdef BISON
$(BISON) $(BISONFLAGS) -o $@ $< $(BISON) $(BISONFLAGS) -o $@ $<
else else
@$(missing) bison $< $@ @$(missing) bison $< $@
endif endif
$(srcdir)/cubescan.c: cubescan.l cubescan.c: cubescan.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
@$(missing) flex $< $@ @$(missing) flex $< $@
endif endif
distprep: $(srcdir)/cubeparse.c $(srcdir)/cubescan.c distprep: cubeparse.c cubescan.c
maintainer-clean: maintainer-clean:
rm -f $(srcdir)/cubeparse.c $(srcdir)/cubescan.c rm -f cubeparse.c cubescan.c
# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.21 2008/08/29 13:02:32 petere Exp $ # $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.22 2009/08/28 20:26:18 petere Exp $
MODULE_big = seg MODULE_big = seg
OBJS = seg.o segparse.o OBJS = seg.o segparse.o
...@@ -21,23 +21,23 @@ endif ...@@ -21,23 +21,23 @@ endif
# segscan is compiled as part of segparse # segscan is compiled as part of segparse
segparse.o: $(srcdir)/segscan.c segparse.o: segscan.c
$(srcdir)/segparse.c: segparse.y segparse.c: segparse.y
ifdef BISON ifdef BISON
$(BISON) $(BISONFLAGS) -o $@ $< $(BISON) $(BISONFLAGS) -o $@ $<
else else
@$(missing) bison $< $@ @$(missing) bison $< $@
endif endif
$(srcdir)/segscan.c: segscan.l segscan.c: segscan.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
@$(missing) flex $< $@ @$(missing) flex $< $@
endif endif
distprep: $(srcdir)/segparse.c $(srcdir)/segscan.c distprep: segparse.c segscan.c
maintainer-clean: maintainer-clean:
rm -f $(srcdir)/segparse.c $(srcdir)/segscan.c rm -f segparse.c segscan.c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# PostgreSQL documentation makefile # PostgreSQL documentation makefile
# #
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.128 2009/08/26 22:24:42 petere Exp $ # $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.129 2009/08/28 20:26:18 petere Exp $
# #
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
...@@ -32,7 +32,7 @@ endif ...@@ -32,7 +32,7 @@ endif
ifndef JADE ifndef JADE
JADE = jade JADE = jade
endif endif
SGMLINCLUDE = -D $(srcdir) SGMLINCLUDE = -D . -D $(srcdir)
ifndef NSGMLS ifndef NSGMLS
NSGMLS = nsgmls NSGMLS = nsgmls
...@@ -75,13 +75,9 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged ...@@ -75,13 +75,9 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
man: man-stamp man: man-stamp
ifeq ($(vpath_build),yes) man-stamp: stylesheet-man.xsl postgres.xml
XSLTPROC_MAN_FLAGS = --stringparam man.output.base.dir '$(srcdir)/'
endif
$(srcdir)/man-stamp: stylesheet-man.xsl postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^ $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
rm $(srcdir)/man1/dblink* rm man1/dblink*
touch $@ touch $@
...@@ -92,30 +88,26 @@ $(srcdir)/man-stamp: stylesheet-man.xsl postgres.xml ...@@ -92,30 +88,26 @@ $(srcdir)/man-stamp: stylesheet-man.xsl postgres.xml
.PHONY: draft .PHONY: draft
JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t sgml -i output-html JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t sgml -i output-html
ifeq ($(vpath_build),yes)
# This only works with openjade, not with the older jade.
JADE.html.call += -V '(define %output-dir% "$(srcdir)/html")'
endif
# The draft target creates HTML output in draft mode, without index (for faster build). # The draft target creates HTML output in draft mode, without index (for faster build).
draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
$(MKDIR_P) $(srcdir)/html $(MKDIR_P) html
$(JADE.html.call) -V draft-mode $< $(JADE.html.call) -V draft-mode $<
cp $(srcdir)/stylesheet.css $(srcdir)/html/ cp $(srcdir)/stylesheet.css html/
html: html-stamp html: html-stamp
$(srcdir)/html-stamp: postgres.sgml $(ALLSGML) stylesheet.dsl html-stamp: postgres.sgml $(ALLSGML) stylesheet.dsl
$(MKDIR_P) $(srcdir)/html $(MKDIR_P) html
$(JADE.html.call) -i include-index $< $(JADE.html.call) -i include-index $<
cp $(srcdir)/stylesheet.css $(srcdir)/html/ cp $(srcdir)/stylesheet.css html/
touch $@ touch $@
$(srcdir)/HTML.index: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl HTML.index: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
@$(MKDIR_P) $(srcdir)/html @$(MKDIR_P) html
$(JADE.html.call) -V html-index $< $(JADE.html.call) -V html-index $<
$(srcdir)/bookindex.sgml: HTML.index bookindex.sgml: HTML.index
LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g -i 'bookindex' -o $@ $< LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g -i 'bookindex' -o $@ $<
# Technically, this should depend on Makefile.global, but then # Technically, this should depend on Makefile.global, but then
...@@ -123,16 +115,16 @@ $(srcdir)/bookindex.sgml: HTML.index ...@@ -123,16 +115,16 @@ $(srcdir)/bookindex.sgml: HTML.index
# even in distribution tarballs. So this is cheating a bit, but it # even in distribution tarballs. So this is cheating a bit, but it
# will achieve the goal of updating the version number when it # will achieve the goal of updating the version number when it
# changes. # changes.
$(srcdir)/version.sgml: $(top_srcdir)/configure version.sgml: $(top_srcdir)/configure
{ \ { \
echo "<!entity version \"$(VERSION)\">"; \ echo "<!entity version \"$(VERSION)\">"; \
echo "<!entity majorversion \"$(MAJORVERSION)\">"; \ echo "<!entity majorversion \"$(MAJORVERSION)\">"; \
} >$@ } >$@
$(srcdir)/features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
$(PERL) $(srcdir)/mk_feature_tables.pl YES $^ > $@ $(PERL) $(srcdir)/mk_feature_tables.pl YES $^ > $@
$(srcdir)/features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
$(PERL) $(srcdir)/mk_feature_tables.pl NO $^ > $@ $(PERL) $(srcdir)/mk_feature_tables.pl NO $^ > $@
...@@ -232,10 +224,6 @@ postgres.xml: postgres.sgml $(ALMOSTALLSGML) ...@@ -232,10 +224,6 @@ postgres.xml: postgres.sgml $(ALMOSTALLSGML)
>$@ >$@
# ' hello Emacs # ' hello Emacs
ifeq ($(vpath_build),yes)
XSLTPROC_HTML_FLAGS = --stringparam base.dir '$(srcdir)/html'
endif
xslthtml: stylesheet.xsl postgres.xml xslthtml: stylesheet.xsl postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^
...@@ -280,9 +268,11 @@ check: postgres.sgml $(ALMOSTALLSGML) ...@@ -280,9 +268,11 @@ check: postgres.sgml $(ALMOSTALLSGML)
## Install ## Install
## ##
found_html = $(wildcard $(srcdir)/html-stamp) vpathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,. $(VPATH)))))
found_html = $(wildcard html-stamp $(srcdir)/html-stamp)
ifneq ($(wildcard $(srcdir)/man-stamp),) ifneq ($(wildcard man-stamp $(srcdir)/man-stamp),)
# SCO OpenServer's man system is sufficiently different to not bother. # SCO OpenServer's man system is sufficiently different to not bother.
ifneq ($(PORTNAME), sco) ifneq ($(PORTNAME), sco)
found_man = yes found_man = yes
...@@ -301,7 +291,7 @@ uninstall: ...@@ -301,7 +291,7 @@ uninstall:
## Install html ## Install html
install-html: html installdirs install-html: html installdirs
cp -R $(srcdir)/html '$(DESTDIR)$(htmldir)' cp -R $(call vpathsearch,html) '$(DESTDIR)$(htmldir)'
## Install man ## Install man
...@@ -316,7 +306,7 @@ sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)') ...@@ -316,7 +306,7 @@ sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
# #
ifeq ($(sqlmansectnum),7) ifeq ($(sqlmansectnum),7)
install-man: install-man:
cp -R $(addprefix $(srcdir)/,man1 man3 man7) '$(DESTDIR)$(mandir)' cp -R $(foreach dir,man1 man3 man7,$(call vpathsearch,$(dir))) '$(DESTDIR)$(mandir)'
else # sqlmansectnum != 7 else # sqlmansectnum != 7
fix_sqlmansectnum = sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \ fix_sqlmansectnum = sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.122 2009/08/27 17:55:53 tgl Exp $ # $PostgreSQL: pgsql/src/Makefile.shlib,v 1.123 2009/08/28 20:26:18 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -415,7 +415,7 @@ exports_file = $(DLL_DEFFILE) ...@@ -415,7 +415,7 @@ exports_file = $(DLL_DEFFILE)
$(exports_file): $(OBJS) $(exports_file): $(OBJS)
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^ $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^
else else
DLL_DEFFILE = $(srcdir)/lib$(NAME)dll.def DLL_DEFFILE = lib$(NAME)dll.def
endif endif
$(shlib): $(OBJS) $(DLL_DEFFILE) $(shlib): $(OBJS) $(DLL_DEFFILE)
...@@ -436,23 +436,23 @@ endif # enable_shared ...@@ -436,23 +436,23 @@ endif # enable_shared
# tarballs. # tarballs.
ifneq (,$(SHLIB_EXPORTS)) ifneq (,$(SHLIB_EXPORTS))
distprep: $(srcdir)/lib$(NAME)dll.def $(srcdir)/lib$(NAME)ddll.def $(srcdir)/blib$(NAME)dll.def distprep: lib$(NAME)dll.def lib$(NAME)ddll.def blib$(NAME)dll.def
UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
$(srcdir)/lib$(NAME)dll.def: $(SHLIB_EXPORTS) lib$(NAME)dll.def: $(SHLIB_EXPORTS)
echo '; DEF file for MS VC++' >$@ echo '; DEF file for MS VC++' >$@
echo 'LIBRARY LIB$(UC_NAME)' >>$@ echo 'LIBRARY LIB$(UC_NAME)' >>$@
echo 'EXPORTS' >>$@ echo 'EXPORTS' >>$@
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
$(srcdir)/lib$(NAME)ddll.def: $(SHLIB_EXPORTS) lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
echo '; DEF file for MS VC++' >$@ echo '; DEF file for MS VC++' >$@
echo 'LIBRARY LIB$(UC_NAME)D' >>$@ echo 'LIBRARY LIB$(UC_NAME)D' >>$@
echo 'EXPORTS' >>$@ echo 'EXPORTS' >>$@
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@ sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
$(srcdir)/blib$(NAME)dll.def: $(SHLIB_EXPORTS) blib$(NAME)dll.def: $(SHLIB_EXPORTS)
echo '; DEF file for Borland C++ Builder' >$@ echo '; DEF file for Borland C++ Builder' >$@
echo 'LIBRARY BLIB$(UC_NAME)' >>$@ echo 'LIBRARY BLIB$(UC_NAME)' >>$@
echo 'EXPORTS' >>$@ echo 'EXPORTS' >>$@
...@@ -551,5 +551,5 @@ clean-lib: ...@@ -551,5 +551,5 @@ clean-lib:
ifneq (,$(SHLIB_EXPORTS)) ifneq (,$(SHLIB_EXPORTS))
maintainer-clean-lib: maintainer-clean-lib:
rm -f $(srcdir)/lib$(NAME)dll.def $(srcdir)/lib$(NAME)ddll.def $(srcdir)/blib$(NAME)dll.def rm -f lib$(NAME)dll.def lib$(NAME)ddll.def blib$(NAME)dll.def
endif endif
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.133 2009/08/26 22:24:43 petere Exp $ # $PostgreSQL: pgsql/src/backend/Makefile,v 1.134 2009/08/28 20:26:18 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -118,7 +118,7 @@ postgres.o: $(OBJS) ...@@ -118,7 +118,7 @@ postgres.o: $(OBJS)
# the make files in our subdirectories. Note that it's important we # the make files in our subdirectories. Note that it's important we
# match the dependencies shown in the subdirectory makefiles! # match the dependencies shown in the subdirectory makefiles!
$(srcdir)/parser/gram.h: parser/gram.y parser/gram.h: parser/gram.y
$(MAKE) -C parser gram.h $(MAKE) -C parser gram.h
utils/fmgroids.h: utils/Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h utils/fmgroids.h: utils/Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h
...@@ -131,7 +131,7 @@ utils/probes.h: utils/probes.d ...@@ -131,7 +131,7 @@ utils/probes.h: utils/probes.d
# we can cut down on the -I options. Also, a symlink is automatically # we can cut down on the -I options. Also, a symlink is automatically
# up to date when we update the base file. # up to date when we update the base file.
$(top_builddir)/src/include/parser/gram.h: $(srcdir)/parser/gram.h $(top_builddir)/src/include/parser/gram.h: parser/gram.h
prereqdir=`cd $(dir $<) >/dev/null && pwd` && \ prereqdir=`cd $(dir $<) >/dev/null && pwd` && \
cd $(dir $@) && rm -f $(notdir $@) && \ cd $(dir $@) && rm -f $(notdir $@) && \
$(LN_S) "$$prereqdir/$(notdir $<)" . $(LN_S) "$$prereqdir/$(notdir $<)" .
...@@ -252,12 +252,12 @@ distclean: clean ...@@ -252,12 +252,12 @@ distclean: clean
rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c
maintainer-clean: distclean maintainer-clean: distclean
rm -f $(srcdir)/bootstrap/bootparse.c \ rm -f bootstrap/bootparse.c \
$(srcdir)/bootstrap/bootscanner.c \ bootstrap/bootscanner.c \
$(srcdir)/parser/gram.c \ parser/gram.c \
$(srcdir)/parser/scan.c \ parser/scan.c \
$(srcdir)/parser/gram.h \ parser/gram.h \
$(srcdir)/utils/misc/guc-file.c utils/misc/guc-file.c
########################################################################## ##########################################################################
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.37 2008/08/29 13:02:32 petere Exp $ # $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.38 2009/08/28 20:26:18 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -18,16 +18,16 @@ include $(top_srcdir)/src/backend/common.mk ...@@ -18,16 +18,16 @@ include $(top_srcdir)/src/backend/common.mk
# bootscanner is compiled as part of bootparse # bootscanner is compiled as part of bootparse
bootparse.o: $(srcdir)/bootscanner.c bootparse.o: bootscanner.c
$(srcdir)/bootparse.c: bootparse.y bootparse.c: bootparse.y
ifdef BISON ifdef BISON
$(BISON) $(BISONFLAGS) -o $@ $< $(BISON) $(BISONFLAGS) -o $@ $<
else else
@$(missing) bison $< $@ @$(missing) bison $< $@
endif endif
$(srcdir)/bootscanner.c: bootscanner.l bootscanner.c: bootscanner.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for parser # Makefile for parser
# #
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.50 2009/08/26 22:15:59 petere Exp $ # $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.51 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -22,7 +22,7 @@ include $(top_srcdir)/src/backend/common.mk ...@@ -22,7 +22,7 @@ include $(top_srcdir)/src/backend/common.mk
# scan is compiled as part of gram # scan is compiled as part of gram
gram.o: $(srcdir)/scan.c gram.o: scan.c
# Latest flex causes warnings in this file. # Latest flex causes warnings in this file.
ifeq ($(GCC),yes) ifeq ($(GCC),yes)
...@@ -37,9 +37,9 @@ endif ...@@ -37,9 +37,9 @@ endif
# important, otherwise make will choose the built-in rule for # important, otherwise make will choose the built-in rule for
# gram.y=>gram.c. # gram.y=>gram.c.
$(srcdir)/gram.h: $(srcdir)/gram.c ; gram.h: gram.c ;
$(srcdir)/gram.c: gram.y gram.c: gram.y
ifdef BISON ifdef BISON
$(BISON) -d $(BISONFLAGS) -o $@ $< $(BISON) -d $(BISONFLAGS) -o $@ $<
else else
...@@ -47,7 +47,7 @@ else ...@@ -47,7 +47,7 @@ else
endif endif
$(srcdir)/scan.c: scan.l scan.c: scan.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
...@@ -56,7 +56,7 @@ endif ...@@ -56,7 +56,7 @@ endif
# Force these dependencies to be known even without dependency info built: # Force these dependencies to be known even without dependency info built:
gram.o keywords.o parser.o: $(srcdir)/gram.h gram.o keywords.o parser.o: gram.h
# gram.c, gram.h, and scan.c are in the distribution tarball, so they # gram.c, gram.h, and scan.c are in the distribution tarball, so they
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for src/backend/snowball # Makefile for src/backend/snowball
# #
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.7 2009/08/26 22:24:43 petere Exp $ # $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.8 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -71,11 +71,7 @@ LANGUAGES= \ ...@@ -71,11 +71,7 @@ LANGUAGES= \
SQLSCRIPT= snowball_create.sql SQLSCRIPT= snowball_create.sql
DICTDIR=tsearch_data DICTDIR=tsearch_data
ifdef VPATH VPATH += $(srcdir)/libstemmer
override VPATH := $(srcdir)/libstemmer:$(VPATH)
else
VPATH = $(srcdir)/libstemmer
endif
NAME := dict_snowball NAME := dict_snowball
rpath = rpath =
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/misc # Makefile for utils/misc
# #
# IDENTIFICATION # IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/utils/misc/Makefile,v 1.28 2008/02/19 10:30:09 petere Exp $ # $PostgreSQL: pgsql/src/backend/utils/misc/Makefile,v 1.29 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,7 +12,7 @@ subdir = src/backend/utils/misc ...@@ -12,7 +12,7 @@ subdir = src/backend/utils/misc
top_builddir = ../../../.. top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
OBJS = guc.o help_config.o pg_rusage.o ps_status.o superuser.o tzparser.o OBJS = guc.o help_config.o pg_rusage.o ps_status.o superuser.o tzparser.o
...@@ -25,9 +25,9 @@ endif ...@@ -25,9 +25,9 @@ endif
include $(top_srcdir)/src/backend/common.mk include $(top_srcdir)/src/backend/common.mk
# guc-file is compiled as part of guc # guc-file is compiled as part of guc
guc.o: $(srcdir)/guc-file.c guc.o: guc-file.c
$(srcdir)/guc-file.c: guc-file.l guc-file.c: guc-file.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.64 2009/08/26 22:24:43 petere Exp $ # $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.65 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global ...@@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global
REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/pg_dump $(CPPFLAGS) override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/pg_dump $(CPPFLAGS)
OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
startup.o prompt.o variables.o large_obj.o print.o describe.o \ startup.o prompt.o variables.o large_obj.o print.o describe.o \
...@@ -32,7 +32,7 @@ all: submake-libpq submake-libpgport psql ...@@ -32,7 +32,7 @@ all: submake-libpq submake-libpgport psql
psql: $(OBJS) $(libpq_builddir)/libpq.a psql: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X) $(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X)
help.o: $(srcdir)/sql_help.h help.o: sql_help.h
dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/% dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
...@@ -40,17 +40,17 @@ dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/% ...@@ -40,17 +40,17 @@ dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
kwlookup.c: % : $(top_srcdir)/src/backend/parser/% kwlookup.c: % : $(top_srcdir)/src/backend/parser/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
$(srcdir)/sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml) sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
$(PERL) $< $(REFDOCDIR) $@ $(PERL) $< $(REFDOCDIR) $@
$(srcdir)/psqlscan.c: psqlscan.l psqlscan.c: psqlscan.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
@$(missing) flex $< $@ @$(missing) flex $< $@
endif endif
distprep: $(srcdir)/sql_help.h $(srcdir)/psqlscan.c distprep: sql_help.h psqlscan.c
install: all installdirs install: all installdirs
$(INSTALL_PROGRAM) psql$(X) '$(DESTDIR)$(bindir)/psql$(X)' $(INSTALL_PROGRAM) psql$(X) '$(DESTDIR)$(bindir)/psql$(X)'
...@@ -67,4 +67,4 @@ clean distclean: ...@@ -67,4 +67,4 @@ clean distclean:
rm -f psql$(X) $(OBJS) dumputils.c keywords.c kwlookup.c rm -f psql$(X) $(OBJS) dumputils.c keywords.c kwlookup.c
maintainer-clean: distclean maintainer-clean: distclean
rm -f $(srcdir)/sql_help.h $(srcdir)/psqlscan.c rm -f sql_help.h psqlscan.c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1998-2009, PostgreSQL Global Development Group # Copyright (c) 1998-2009, PostgreSQL Global Development Group
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.144 2009/08/26 22:24:43 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.145 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -18,7 +18,7 @@ MINOR_VERSION= 6 ...@@ -18,7 +18,7 @@ MINOR_VERSION= 6
PATCHLEVEL=0 PATCHLEVEL=0
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(srcdir) -DMAJOR_VERSION=$(MAJOR_VERSION) \ -I. -I$(srcdir) -DMAJOR_VERSION=$(MAJOR_VERSION) \
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \ -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
$(CPPFLAGS) $(CPPFLAGS)
...@@ -34,33 +34,33 @@ ecpg: $(OBJS) ...@@ -34,33 +34,33 @@ ecpg: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(PTHREAD_LIBS) -o $@$(X) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(PTHREAD_LIBS) -o $@$(X)
# pgc is compiled as part of preproc # pgc is compiled as part of preproc
preproc.o: $(srcdir)/pgc.c preproc.o: pgc.c
$(srcdir)/preproc.h: $(srcdir)/preproc.c ; preproc.h: preproc.c ;
$(srcdir)/preproc.c: $(srcdir)/preproc.y preproc.c: preproc.y
ifdef BISON ifdef BISON
$(BISON) -d $(BISONFLAGS) -o $@ $< $(BISON) -d $(BISONFLAGS) -o $@ $<
else else
@$(missing) bison $< $@ @$(missing) bison $< $@
endif endif
$(srcdir)/pgc.c: $(srcdir)/pgc.l pgc.c: pgc.l
ifdef FLEX ifdef FLEX
$(FLEX) $(FLEXFLAGS) -o'$@' $< $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
@$(missing) flex $< $@ @$(missing) flex $< $@
endif endif
$(srcdir)/preproc.y: $(top_srcdir)/src/backend/parser/gram.y parse.pl ecpg.addons ecpg.header ecpg.tokens ecpg.trailer ecpg.type preproc.y: ../../../backend/parser/gram.y parse.pl ecpg.addons ecpg.header ecpg.tokens ecpg.trailer ecpg.type
$(PERL) $(srcdir)/parse.pl $(srcdir) < $< > $@ $(PERL) $(srcdir)/parse.pl $(srcdir) < $< > $@
ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.h ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.h
kwlookup.c: % : $(top_srcdir)/src/backend/parser/% kwlookup.c: % : ../../../backend/parser/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
distprep: $(srcdir)/preproc.y $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c distprep: preproc.y preproc.c preproc.h pgc.c
install: all installdirs install: all installdirs
$(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)' $(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)'
...@@ -80,4 +80,4 @@ clean distclean: ...@@ -80,4 +80,4 @@ clean distclean:
# since we want to ship those files in the distribution for people with # since we want to ship those files in the distribution for people with
# inadequate tools. Instead, `make maintainer-clean' will remove them. # inadequate tools. Instead, `make maintainer-clean' will remove them.
maintainer-clean: distclean maintainer-clean: distclean
rm -f $(srcdir)/preproc.y $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c rm -f preproc.y preproc.c preproc.h pgc.c
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.175 2009/08/26 22:24:43 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.176 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -90,9 +90,9 @@ encnames.c wchar.c : % : $(backend_src)/utils/mb/% ...@@ -90,9 +90,9 @@ encnames.c wchar.c : % : $(backend_src)/utils/mb/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
distprep: $(srcdir)/libpq-dist.rc distprep: libpq-dist.rc
libpq.rc $(srcdir)/libpq-dist.rc: libpq.rc.in libpq.rc libpq-dist.rc: libpq.rc.in
sed -e 's/\(VERSION.*\),0 *$$/\1,'`date '+%y%j' | sed 's/^0*//'`'/' $< >$@ sed -e 's/\(VERSION.*\),0 *$$/\1,'`date '+%y%j' | sed 's/^0*//'`'/' $< >$@
# Depend on Makefile.global to force rebuild on re-run of configure. # Depend on Makefile.global to force rebuild on re-run of configure.
...@@ -128,4 +128,4 @@ clean distclean: clean-lib ...@@ -128,4 +128,4 @@ clean distclean: clean-lib
rm -f pg_config_paths.h rm -f pg_config_paths.h
maintainer-clean: distclean maintainer-clean-lib maintainer-clean: distclean maintainer-clean-lib
rm -f $(srcdir)/libpq-dist.rc rm -f libpq-dist.rc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the plpgsql shared object # Makefile for the plpgsql shared object
# #
# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.33 2008/08/29 13:02:33 petere Exp $ # $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.34 2009/08/28 20:26:19 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,7 +13,7 @@ include $(top_builddir)/src/Makefile.global ...@@ -13,7 +13,7 @@ include $(top_builddir)/src/Makefile.global
# Shared library parameters # Shared library parameters
NAME= plpgsql NAME= plpgsql
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
SHLIB_LINK = $(filter -lintl, $(LIBS)) SHLIB_LINK = $(filter -lintl, $(LIBS))
rpath = rpath =
...@@ -33,16 +33,16 @@ uninstall: uninstall-lib ...@@ -33,16 +33,16 @@ uninstall: uninstall-lib
# Force these dependencies to be known even without dependency info built: # Force these dependencies to be known even without dependency info built:
pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl_gram.h pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h pl_gram.h
# pl_scan is compiled as part of pl_gram # pl_scan is compiled as part of pl_gram
pl_gram.o: $(srcdir)/pl_scan.c pl_gram.o: pl_scan.c
# See notes in src/backend/parser/Makefile about the following two rules # See notes in src/backend/parser/Makefile about the following two rules
$(srcdir)/pl_gram.h: $(srcdir)/pl_gram.c ; pl_gram.h: pl_gram.c ;
$(srcdir)/pl_gram.c: gram.y pl_gram.c: gram.y
ifdef BISON ifdef BISON
$(BISON) -d $(BISONFLAGS) -o $@ $< $(BISON) -d $(BISONFLAGS) -o $@ $<
else else
...@@ -53,14 +53,14 @@ endif ...@@ -53,14 +53,14 @@ endif
# depending on what the compile-time locale setting is. Hence, force # depending on what the compile-time locale setting is. Hence, force
# it to see LC_CTYPE=C to ensure consistent build results. # it to see LC_CTYPE=C to ensure consistent build results.
$(srcdir)/pl_scan.c: scan.l pl_scan.c: scan.l
ifdef FLEX ifdef FLEX
LC_CTYPE=C $(FLEX) $(FLEXFLAGS) -o'$@' $< LC_CTYPE=C $(FLEX) $(FLEXFLAGS) -o'$@' $<
else else
@$(missing) flex $< $@ @$(missing) flex $< $@
endif endif
distprep: $(srcdir)/pl_scan.c $(srcdir)/pl_gram.h $(srcdir)/pl_gram.c distprep: pl_scan.c pl_gram.h pl_gram.c
# pl_gram.c, pl_gram.h, and pl_scan.c are in the distribution tarball, # pl_gram.c, pl_gram.h, and pl_scan.c are in the distribution tarball,
# so they are not cleaned here. # so they are not cleaned here.
...@@ -68,4 +68,4 @@ clean distclean: clean-lib ...@@ -68,4 +68,4 @@ clean distclean: clean-lib
rm -f $(OBJS) rm -f $(OBJS)
maintainer-clean: clean maintainer-clean: clean
rm -f $(srcdir)/pl_gram.c $(srcdir)/pl_gram.h $(srcdir)/pl_scan.c rm -f pl_gram.c pl_gram.h pl_scan.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment