perl: perl/Makefile
$(MAKE) -C perl
-perl/Makefile: perl/Makefile.PL perl/Collectd/Makefile.PL
+perl/Makefile: .perl-directory-stamp perl/Makefile.PL perl/Collectd/Makefile.PL
cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@
+.perl-directory-stamp:
+ if test ! -d perl; then \
+ mkdir -p perl/Collectd; \
+ cp $(srcdir)/perl/{Collectd.pm,Makefile.PL} perl/; \
+ cp $(srcdir)/perl/Collectd/{Unixsock.pm,Makefile.PL} perl/Collectd/; \
+ fi
+ touch $@
+
.PHONY: perl
with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
fi
-if test ".." != "$ac_top_srcdir"
-then
- # we're not building from the source tree
- for file in \
- bindings/perl/Collectd/Makefile.PL \
- bindings/perl/Collectd/Unixsock.pm \
- bindings/perl/Collectd.pm \
- bindings/perl/Makefile.PL
- do
- dir=`dirname $file`
- mkdir -p $dir
- cp src/$ac_top_srcdir/$file $file
- done
-fi
-
cat <<EOF;
Configuration: