hivex: Fix building on platforms without O_CLOEXEC such as FreeBSD
[hivex.git] / perl / Makefile.am
index 9d5b692..1722bcf 100644 (file)
@@ -19,6 +19,7 @@ EXTRA_DIST = \
        Makefile.PL.in \
        run-perl-tests \
        lib/Win/Hivex.pm \
+       lib/Win/Hivex/Regedit.pm \
        Hivex.xs \
        t/*.t \
        typemap
@@ -45,6 +46,7 @@ all: Makefile-pl src_deps
        $(MAKE) -f Makefile-pl
 
 Makefile-pl: Makefile.PL
+       -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/.
        perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
 
 # No!  Otherwise it is deleted before the clean-local rule runs.
@@ -52,7 +54,7 @@ Makefile-pl: Makefile.PL
 
 clean-local:
        -$(MAKE) -f Makefile-pl clean
-       rm -f Makefile-pl
+       rm -f Makefile-pl Makefile-pl.old
 
 install-data-hook:
        $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install