From 1c6adda3b0e58658b9484e47477c12dcefdf1908 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 5 May 2015 15:29:52 +0100 Subject: [PATCH] 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. --- Makefile.am | 3 +++ configure.ac | 1 + 2 files changed, 4 insertions(+) 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. -- 2.47.2