From: Ross Burton Date: Tue, 5 May 2015 14:29:52 +0000 (+0100) Subject: build: fix out of tree builds X-Git-Tag: v3.1.900a~103^2~1^2~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F534%2Fhead;p=thirdparty%2Flibarchive.git build: fix out of tree builds When writing files with shell directly it's best to create the target directory first, as it's possible that the build directory is almost empty. In particular out of tree builds with automake's dependency tracking disabled is an easy way of triggering this. --- diff --git a/Makefile.am b/Makefile.am index 2e2755778..a5131665d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -572,6 +572,7 @@ libarchive_test_LDADD= $(LTLIBICONV) # Building it automatically provides a sanity-check on libarchive_test_SOURCES # above. libarchive/test/list.h: Makefile + $(MKDIR_P) libarchive/test cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test LRZIP=NOCONFIG @@ -948,6 +949,7 @@ bsdtar_test_CPPFLAGS=\ $(PLATFORMCPPFLAGS) tar/test/list.h: Makefile + $(MKDIR_P) tar/test cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h if BUILD_BSDTAR @@ -1094,6 +1096,7 @@ bsdcpio_test_CPPFLAGS= \ bsdcpio_test_LDADD=libarchive_fe.la cpio/test/list.h: Makefile + $(MKDIR_P) cpio/test cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h if BUILD_BSDCPIO diff --git a/configure.ac b/configure.ac index 767ea9698..2fd994b64 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,7 @@ AC_USE_SYSTEM_EXTENSIONS AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_CHECK_TOOL([STRIP],[strip]) +AC_PROG_MKDIR_P # # Options for building bsdtar.