summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorMichael Marineau2014-09-03 05:39:28 +0200
committerKarel Zak2014-09-03 09:50:24 +0200
commitcb52ac9847b70bfab3b6ca45b3e81e6c89900190 (patch)
tree78670e761c6e42b18c1342437a6de9e2ad5cca9d /Makefile.am
parentlibfdisk: add support for sfdisk-like script format (diff)
downloadkernel-qcow2-util-linux-cb52ac9847b70bfab3b6ca45b3e81e6c89900190.tar.gz
kernel-qcow2-util-linux-cb52ac9847b70bfab3b6ca45b3e81e6c89900190.tar.xz
kernel-qcow2-util-linux-cb52ac9847b70bfab3b6ca45b3e81e6c89900190.zip
build-sys: create parent directory for $(PATHFILES)
When building outside the source tree there is nothing to guarantee the target directory exists before writing to it. Most of the time this just happens to work because something else creates the directory but not always. For example: $ mkdir build $ cd build $ ../configure --disable-dependency-tracking $ make libuuid/uuid.pc GEN libuuid/uuid.pc /bin/sh: line 2: libuuid/uuid.pc.tmp: No such file or directory make: *** [libuuid/uuid.pc] Error 1
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 79b5aea78..08269e248 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -128,6 +128,7 @@ EXTRA_DIST += $(PATHFILES:=.in)
$(PATHFILES): Makefile
@ rm -f $@ $@.tmp
+ $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
$(AM_V_GEN) srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit_cmd) $${srcdir}$@.in >$@.tmp