Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | From 6bbde84a2197c97e49d9e64118a979728209e436 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
| 3 | Date: Wed, 23 Sep 2015 23:21:42 +0200 |
| 4 | Subject: [PATCH] Makefile.am: avoid race when creating autostart directories |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | fixes: |
| 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 | |
| 24 | Upstream-Status: Pending |
| 25 | |
| 26 | Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com> |
| 27 | --- |
| 28 | Makefile.am | 6 ++---- |
| 29 | 1 file changed, 2 insertions(+), 4 deletions(-) |
| 30 | |
| 31 | diff --git a/Makefile.am b/Makefile.am |
| 32 | index 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 | -- |
| 53 | 2.1.0 |
| 54 | |