]> git.saurik.com Git - wxWidgets.git/commitdiff
avoiding copies if not necessary (better dependancy tracking)
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 11 Jul 2007 15:50:41 +0000 (15:50 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 11 Jul 2007 15:50:41 +0000 (15:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/mac/pbsetup-sh

index c7477c8a4231f3026958c96facdb78f92ea10030..e8a671614cd587129346a0175836955d1507c358 100755 (executable)
@@ -49,9 +49,15 @@ 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 newer or non existant
 #
-cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
+if [ ! -f "${2}/include/wx/setup.h" ] ; then
+    cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
+else
+    if [ "${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"
+    fi
+fi
 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