build - Fix ordering to avoid -j race
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 16 Mar 2010 08:57:28 +0000 (01:57 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 16 Mar 2010 08:57:28 +0000 (01:57 -0700)
* The mkdir -p must complete prior to any source file copies.

gnu/usr.bin/cc44/gmp/Makefile

index 6ab4f39..ce279da 100644 (file)
@@ -181,9 +181,10 @@ LO_OBJECTS=        ${MPF_OBJECTS} ${MPZ_OBJECTS} ${MPQ_OBJECTS} ${MPN_OBJECTS} \
 .if exists(${mapsource}) && empty(MPNSRC:M${source})
 
 .if !exists(${source})
-${source}: ${mapsource}
-       cp ${.ALLSRC} ${.TARGET}
+${source}: ${mapsource} mkdirs
+       cp ${.ALLSRC:Nmkdirs} ${.TARGET}
 CLEANFILES+=   ${source}
+.ORDER: mkdir ${source}
 .endif
 
 MPNSRC+=       ${source}