1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
SUBDIRS = polls
## **************** Generic Stuff *****************
.PHONY: perl-all perl-clean perl-check perl-dist-hook perl-install
all: perl-all
clean: perl-clean
check: perl-check
dist-hook: perl-dist-hook
install-hook: perl-install
## ************** Specific Modules ****************
if PERL_BINDINGS
## rebuild the perl module makefile if we touch the headers,
## so that the module gets rebuilt, the dependence on the build lib
## ensures the rebuild happens
perl-makefile.stamp: perl/Makefile.PL perl/*/Makefile.PL perl/compile_flags.pl \
$(top_builddir)/Eris/.libs/liberis-1.2.so perl/*.h
cd perl && perl Makefile.PL PREFIX=$(prefix) LIB=$(libdir)/perl
touch perl-makefile.stamp
perl-all: perl-makefile.stamp
cd perl && make
perl-clean:
test -e perl-makefile.stamp && cd perl && make clean
rm -f perl-makefile.stamp
perl-check: perl-makefile.stamp
cd perl && make test
perl-install: perl-makefile.stamp
cd perl && make install
endif
## PERL_BINDINGS
## We need to distribute the perl code in the tarball, regardless of
## whether we're building bindings
## This assumes only one level of directories under bindings/perl,
## that's all we need for now and I don't know how portable mkdir -p is
perl-dist-hook:
perl_dist_dir=`cd $(distdir) && pwd`/perl; \
test -d $$perl_dist_dir || mkdir $$perl_dist_dir || exit 1; \
perl_dist_files=`cat perl/MANIFEST`; \
for file in $$perl_dist_files; do \
test -e perl/$$file || exit 1; \
dir=`echo $$file | sed -e 's#/*[^/]*$$##'`; \
test "$$dir" = "" || test -d $$perl_dist_dir/$$dir \
|| mkdir $$perl_dist_dir/$$dir || exit 1; \
cp perl/$$file $$perl_dist_dir/$$file || exit 1; \
done
|