# Makefile for PL/Perl
-# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.38 2010/01/09 02:40:50 adunstan Exp $
+# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.39 2010/01/09 03:53:40 tgl Exp $
subdir = src/pl/plperl
top_builddir = ../../..
override CFLAGS += -Wno-comment
endif
-override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -I$(perl_archlibexp)/CORE
+override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) -I$(perl_archlibexp)/CORE
rpathdir = $(perl_archlibexp)/CORE
OBJS = plperl.o spi_internal.o SPI.o
+PERLCHUNKS = plc_perlboot.pl plc_safe_bad.pl plc_safe_ok.pl
+
SHLIB_LINK = $(perl_embed_ldflags)
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
plperl.o: perlchunks.h
-perlchunks.h: plc_*.pl
- $(PERL) text2macro.pl --strip='^(\#.*|\s*)$$' plc_*.pl > perlchunks.htmp
+perlchunks.h: $(PERLCHUNKS)
+ $(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > perlchunks.htmp
mv perlchunks.htmp perlchunks.h
all: all-lib