Patchwork harden against parallel builds

login
register
mail settings
Submitter Mike Stump
Date Feb. 13, 2011, 1:06 p.m.
Message ID <447400CF-4BA2-404B-A4D2-DBD2006CBAEF@comcast.net>
Download mbox | patch
Permalink /patch/82990/
State New
Headers show

Comments

Mike Stump - Feb. 13, 2011, 1:06 p.m.
* config/t-darwin (config/darwin.h.rebuild): Harden against parallel builds.

cp:
 	* Make-lang.in (objcp/plugin/parser.h): Harden against parallel builds.
* config/t-darwin (config/darwin.h.rebuild): Harden against parallel builds.

cp:
 	* Make-lang.in (objcp/plugin/parser.h): Harden against parallel builds.

Patch

Index: cp/Make-lang.in
===================================================================
--- cp/Make-lang.in	(revision 170107)
+++ cp/Make-lang.in	(working copy)
@@ -339,11 +339,9 @@ 
 	$(COMPILER_FOR_BUILD) $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) $(srcdir)/config/slashify.c -o $@
 
 $(objdir)/objcp/plugin/parser.h: $(srcdir)/objcp/plugin/parser.h build/slashify
-	test -d objcp || mkdir objcp
-	test -d objcp/plugin || mkdir objcp/plugin
+	$(mkinstalldirs) objcp/plugin
 	build/slashify < $< > $@
 
 $(objdir)/objcp/plugin/lex.h: $(srcdir)/objcp/plugin/lex.h build/slashify
-	test -d objcp || mkdir objcp
-	test -d objcp/plugin || mkdir objcp/plugin
+	$(mkinstalldirs) objcp/plugin
 	build/slashify < $< > $@
Index: config/t-darwin
===================================================================
--- config/t-darwin	(revision 170107)
+++ config/t-darwin	(working copy)
@@ -23,11 +23,11 @@ 
 $(srcdir)/config/darwin.h: config/darwin.h.rebuild
 
 config/darwin.h.rebuild: build/slashify1
+	@$(mkinstalldirs) config
 	@if [ ! -e $(srcdir)/config/darwin.h					\
 	      -o $(srcdir)/config/darwin.h -nt config/darwin.h ]; then		\
-		{ test -d config || mkdir config; } &&				\
-		cp -p $(srcdir)/config/darwin-sections.def			\
-		      config/darwin-sections.def &&				\
+		cp $(srcdir)/config/darwin-sections.def				\
+		   config/darwin-sections.def &&				\
 		build/slashify1 < $(srcdir)/config/darwin.h  >config/darwin.h;	\
 	fi