blob: 2762e1c21482de5c212c244fdb18884d08502ad5 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 6bbde84a2197c97e49d9e64118a979728209e436 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Wed, 23 Sep 2015 23:21:42 +0200
4Subject: [PATCH] Makefile.am: avoid race when creating autostart directories
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9fixes:
10
11| make: creating data/xsession/openbox-gnome-session
12| make: creating data/xsession/openbox-session
13| make: creating data/xsession/openbox-kde-session
14| make: creating data/autostart/openbox-autostart
15| make: creating doc/openbox.1
16| make: creating data/autostart/autostart
17| make: creating doc/openbox-session.1
18| make: creating doc/openbox-gnome-session.1
19| make: creating doc/openbox-kde-session.1
20| make: creating doc/obxprop.1
21| mkdir: cannot create directory './data/autostart': File exists
22| Makefile:4329: recipe for target 'data/autostart/autostart' failed
23
24Upstream-Status: Pending
25
26Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com>
27---
28 Makefile.am | 6 ++----
29 1 file changed, 2 insertions(+), 4 deletions(-)
30
31diff --git a/Makefile.am b/Makefile.am
32index f25bf8e..306e77d 100644
33--- a/Makefile.am
34+++ b/Makefile.am
35@@ -505,14 +505,12 @@ edit = $(SED) \
36
37 data/autostart/autostart: $(top_srcdir)/data/autostart/autostart.in Makefile
38 @echo make: creating $@
39- @test -d $(shell dirname $(top_builddir)/$@) || \
40- mkdir $(shell dirname $(top_builddir)/$@)
41+ mkdir -p $(shell dirname $(top_builddir)/$@)
42 @$(edit) $< >$(top_builddir)/$@
43
44 data/autostart/openbox-autostart: $(top_srcdir)/data/autostart/openbox-autostart.in Makefile
45 @echo make: creating $@
46- @test -d $(shell dirname $(top_builddir)/$@) || \
47- mkdir $(shell dirname $(top_builddir)/$@)
48+ mkdir -p $(shell dirname $(top_builddir)/$@)
49 @$(edit) $< >$(top_builddir)/$@
50
51 %.desktop: %.desktop.in Makefile
52--
532.1.0
54