* [PATCH] build-sys: create parent directory for $(PATHFILES)
@ 2014-09-03 3:39 Michael Marineau
2014-09-03 7:53 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Michael Marineau @ 2014-09-03 3:39 UTC (permalink / raw)
To: util-linux; +Cc: Michael Marineau
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-03 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 3:39 [PATCH] build-sys: create parent directory for $(PATHFILES) Michael Marineau
2014-09-03 7:53 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox