Integrate bindings subdirectory into the build process.
[liboping.git] / bindings / Makefile.am
1 EXTRA_DIST = perl/Changes perl/MANIFEST perl/META.yml perl/Makefile.PL \
2                 perl/Oping.xs perl/README perl/lib/Net/Oping.pm perl/t/Oping.t \
3                 perl/typemap
4
5 all-local: @BINDINGS@
6
7 install-exec-local:
8         [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install )
9
10 clean-local:
11         [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
12
13 test:
14         [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) test )
15
16 perl-bindings: perl/Makefile
17         cd perl && $(MAKE)
18
19 perl/Makefile: perl/Makefile.PL $(top_builddir)/config.status
20         if test ! -d perl; then \
21                 for file in $(EXTRA_DIST); do \
22                         mkdir -p `dirname $$file`; \
23                         cp $(srcdir)/$$file `dirname $$file`; \
24                 done \
25         fi
26         
27         cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@
28
29
30 .PHONY: perl-bindings
31