Skip to content

Commit c79640e

Browse files
committed
Fix makefile so it works for VPATH case.
1 parent a2b34b1 commit c79640e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pl/plperl/GNUmakefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Makefile for PL/Perl
2-
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.38 2010/01/09 02:40:50 adunstan Exp $
2+
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.39 2010/01/09 03:53:40 tgl Exp $
33

44
subdir = src/pl/plperl
55
top_builddir = ../../..
@@ -27,7 +27,7 @@ override CPPFLAGS += -DPLPERL_HAVE_UID_GID
2727
override CFLAGS += -Wno-comment
2828
endif
2929

30-
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -I$(perl_archlibexp)/CORE
30+
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) -I$(perl_archlibexp)/CORE
3131

3232
rpathdir = $(perl_archlibexp)/CORE
3333

@@ -36,6 +36,8 @@ NAME = plperl
3636

3737
OBJS = plperl.o spi_internal.o SPI.o
3838

39+
PERLCHUNKS = plc_perlboot.pl plc_safe_bad.pl plc_safe_ok.pl
40+
3941
SHLIB_LINK = $(perl_embed_ldflags)
4042

4143
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
@@ -47,8 +49,8 @@ include $(top_srcdir)/src/Makefile.shlib
4749

4850
plperl.o: perlchunks.h
4951

50-
perlchunks.h: plc_*.pl
51-
$(PERL) text2macro.pl --strip='^(\#.*|\s*)$$' plc_*.pl > perlchunks.htmp
52+
perlchunks.h: $(PERLCHUNKS)
53+
$(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > perlchunks.htmp
5254
mv perlchunks.htmp perlchunks.h
5355

5456
all: all-lib

0 commit comments

Comments
 (0)