]> granicus.if.org Git - postgresql/commitdiff
Fix makefile so it works for VPATH case.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 9 Jan 2010 03:53:40 +0000 (03:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 9 Jan 2010 03:53:40 +0000 (03:53 +0000)
src/pl/plperl/GNUmakefile

index 8a30a62687d738bee9b4a09ec20c16ead8b4e76e..a241cbce297a53ae2432825c9b00da911dbfe847 100644 (file)
@@ -1,5 +1,5 @@
 # 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 = ../../..
@@ -27,7 +27,7 @@ override CPPFLAGS += -DPLPERL_HAVE_UID_GID
 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
 
@@ -36,6 +36,8 @@ NAME = plperl
 
 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
@@ -47,8 +49,8 @@ include $(top_srcdir)/src/Makefile.shlib
 
 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