mklib: Ensure target directory exists for library
authorDan Nicholson <dbn.lists@gmail.com>
Mon, 3 Aug 2009 15:35:43 +0000 (08:35 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Tue, 4 Aug 2009 13:30:46 +0000 (06:30 -0700)
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit 23671e5358ffc0abfec83aeea9a515b09a6b35f3)

bin/mklib

index 244494500685c9defe6aeb0177f054fbbda4ab6e..db97087c0a614c24ef9ee90b600a193173bf1466 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -971,5 +971,6 @@ esac
 #
 if [ ${INSTALLDIR} != "." ] ; then
     echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
+    test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR}
     mv ${FINAL_LIBS} ${INSTALLDIR}/
 fi