From: Michael Marineau Date: Wed, 3 Sep 2014 03:39:28 +0000 (-0700) Subject: build-sys: create parent directory for $(PATHFILES) X-Git-Tag: v2.26-rc1~468 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb52ac9847b70bfab3b6ca45b3e81e6c89900190;p=thirdparty%2Futil-linux.git 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 --- diff --git a/Makefile.am b/Makefile.am index 79b5aea782..08269e2482 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