From 0ab2815743d89b1cd283abaf4d2cb77fed4a2df4 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Sun, 9 Nov 2008 14:24:10 +0100 Subject: avoid race condition for parallel jobs --- Makefile.am | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 1a32798..7c13340 100644 --- a/Makefile.am +++ b/Makefile.am @@ -167,20 +167,25 @@ APPDEFAULTFILES = \ app-defaults/Xedit-color \ app-defaults/Xedit +$(APPDEFAULTFILES): appsubdir + +.PHONY: appsubdir + +# Ensure ./app-defaults exists, avoiding race condition for parallel jobs +appsubdir: + test -d app-defaults || mkdir app-defaults + if USE_XPRINT app-defaults/Xedit.ad: - test -d app-defaults || mkdir app-defaults cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad else app-defaults/Xedit.ad: - test -d app-defaults || mkdir app-defaults cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad endif SUFFIXES = .ad .ad: - test -d app-defaults || mkdir app-defaults cp $< $@ appdefaultdir = @appdefaultdir@ -- cgit v1.2.3