]> git.saurik.com Git - wxWidgets.git/blobdiff - distrib/mac/pbsetup-sh
preserve the arguments read from configarg.cache in it
[wxWidgets.git] / distrib / mac / pbsetup-sh
index c7477c8a4231f3026958c96facdb78f92ea10030..e6a4f6909b8e103f9ef074b07611b2b124167c79 100755 (executable)
@@ -49,10 +49,13 @@ if [ "${1}/../include/wx/mac/setup0.h" -nt "${1}/../include/wx/mac/setup.h" ] ;
     echo "${0}:${LINENO}: warning: edit or replace \"include/wx/mac/setup.h\" to integrate changes"
 fi
 #
-# Copy setup.h to setup.h if setup.h doesn't exist
+# Copy user setup.h to build setup.h if the latter doesn't exist or is older
 #
-cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
-if [ ! -f "${2}/include/wx/setup.h" ] ; then
-    echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
-    exit 1
+if [ ! -f "${2}/include/wx/setup.h" -o \
+     "${1}/../include/wx/mac/setup.h" -nt "${2}/include/wx/setup.h" ] ; then 
+    cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
+    if [ ! -f "${2}/include/wx/setup.h" ] ; then
+        echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
+        exit 1
+    fi
 fi