]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
build: fix out of tree builds 534/head
authorRoss Burton <ross.burton@intel.com>
Tue, 5 May 2015 14:29:52 +0000 (15:29 +0100)
committerRoss Burton <ross.burton@intel.com>
Tue, 5 May 2015 14:29:52 +0000 (15:29 +0100)
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
configure.ac

index 2e275577877a4b97ec76c193d2d52655b7aeb04c..a5131665d7f9209b6dfe5cc48e92fba294fd8b49 100644 (file)
@@ -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
index 767ea9698de61d58b47615f9a5b993bb9181e0bf..2fd994b64ab26691d5054c8d4e3ce9b51d76f078 100644 (file)
@@ -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.