From: Michael Marineau <michael.marineau@coreos.com>
To: util-linux@vger.kernel.org
Cc: Michael Marineau <michael.marineau@coreos.com>
Subject: [PATCH] build-sys: create parent directory for $(PATHFILES)
Date: Tue, 2 Sep 2014 20:39:28 -0700 [thread overview]
Message-ID: <1409715568-24476-1-git-send-email-michael.marineau@coreos.com> (raw)
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
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 79b5aea..08269e2 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
--
1.8.5.5
next reply other threads:[~2014-09-03 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 3:39 Michael Marineau [this message]
2014-09-03 7:53 ` [PATCH] build-sys: create parent directory for $(PATHFILES) Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409715568-24476-1-git-send-email-michael.marineau@coreos.com \
--to=michael.marineau@coreos.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.