All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] build-sys: create parent directory for $(PATHFILES)
  2014-09-03  3:39 [PATCH] build-sys: create parent directory for $(PATHFILES) Michael Marineau
@ 2014-09-03  7:53 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-09-03  7:53 UTC (permalink / raw)
  To: Michael Marineau; +Cc: util-linux

On Tue, Sep 02, 2014 at 08:39:28PM -0700, Michael Marineau wrote:
>  Makefile.am | 1 +
>  1 file changed, 1 insertion(+)

 Applied (will be in 2.25.1 too), thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[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 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.