OSDN Git Service

* config/t-darwin (config/darwin.h.rebuild): Harden against parallel builds.
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Feb 2011 13:03:20 +0000 (13:03 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Feb 2011 13:03:20 +0000 (13:03 +0000)
cp:
* Make-lang.in (objcp/plugin/parser.h): Harden against parallel builds.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170108 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/t-darwin
gcc/cp/ChangeLog
gcc/cp/Make-lang.in

index df33d96..2d2c69f 100644 (file)
@@ -1,6 +1,7 @@
 2011-02-13  Mike Stump  <mikestump@comcast.net>
 
        * config/t-darwin (build/slashify1): Harden against rebuilds.
+       (config/darwin.h.rebuild): Harden against parallel builds.
        * config/slashify.c: Nix parms to quite the build.
 
 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
index 1caee4b..b8b872e 100644 (file)
@@ -23,11 +23,11 @@ build/slashify1: $(srcdir)/config/slashify.c
 $(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
 
index 9ed9a6f..34f23da 100644 (file)
@@ -4,6 +4,7 @@
        * lex.c: Plugify.
        * Make-lang.in (objcp/plugin/lex.h): Likewise.
        (build/slashify): Harden against rebuilds.
+       (objcp/plugin/parser.h): Harden against parallel builds.
 
        * Make-lang.in (cp/parser.o): Move c-family/c-objc.h dependancy
        down.
index 831c36a..6ec4dda 100644 (file)
@@ -339,11 +339,9 @@ build/slashify: # $(srcdir)/config/slashify.c
        $(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 < $< > $@