1#------------------------------------------------------------------------- 2# 3# Makefile-- 4# Makefile for tutorial 5# 6# By default, this builds against an existing PostgreSQL installation 7# (the one identified by whichever pg_config is first in your path). 8# Within a configured source tree, you can say "make NO_PGXS=1 all" 9# to build using the surrounding source tree. 10# 11# IDENTIFICATION 12# src/tutorial/Makefile 13# 14#------------------------------------------------------------------------- 15 16MODULES = complex funcs 17DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.sql 18 19ifdef NO_PGXS 20subdir = src/tutorial 21top_builddir = ../.. 22include $(top_builddir)/src/Makefile.global 23include $(top_srcdir)/src/makefiles/pgxs.mk 24else 25PG_CONFIG = pg_config 26PGXS := $(shell $(PG_CONFIG) --pgxs) 27include $(PGXS) 28endif 29 30%.sql: %.source 31 rm -f $@; \ 32 C=`pwd`; \ 33 sed -e "s:_OBJWD_:$$C:g" < $< > $@ 34