X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b9d8fe18e02e9d848d205c3f36812cd56fc1bcd..673ae68a3c63f85da2f58f50c858efb9deeff79c:/distrib/mac/pbsetup-sh diff --git a/distrib/mac/pbsetup-sh b/distrib/mac/pbsetup-sh index e81926e4de..f7acaff2ee 100755 --- a/distrib/mac/pbsetup-sh +++ b/distrib/mac/pbsetup-sh @@ -10,12 +10,12 @@ #-- Licence: wxWindows licence #----------------------------------------------------------------------------- # -# Usage: $0 SRCROOT DERIVED_SOURCES_DIR +# Usage: $0 SRCROOT SYMROOT # # Display errors/warnings in the correct format for ProjectBuilder parsing # if [ $# -ne 2 ] ; then - echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT DERIVED_SOURCES_DIR" + echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT SYMROOT" exit 1 fi # @@ -32,27 +32,30 @@ fi # Copy stock setup0.h to setup.h if it doesn't exist # preserve user modifications made to setup.h # -if [ ! -f "${1}/../include/wx/mac/setup.h" ]; then - echo "${0}:${LINENO}: warning: copying \"${1}/../include/wx/mac/setup0.h\" to \"${1}/../include/wx/mac/setup.h\"" - echo "${0}:${LINENO}: warning: edit \"${1}/../include/wx/mac/setup.h\" to choose the features you would like to compile wxWindows with[out]" - cp "${1}/../include/wx/mac/setup0.h" "${1}/../include/wx/mac/setup.h" - if [ ! -f "${1}/../include/wx/mac/setup.h" ]; then - echo "${0}:${LINENO}: error: unable to create setup file \"${1}/../include/wx/mac/setup.h\"" +if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then + echo "${0}:${LINENO}: warning: copying \"include/wx/osx/setup0.h\" to \"include/wx/osx/setup.h\"" + echo "${0}:${LINENO}: warning: edit \"include/wx/osx/setup.h\" to choose the features you would like to compile wxWindows with[out]" + cp "${1}/../include/wx/osx/setup0.h" "${1}/../include/wx/osx/setup.h" + if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then + echo "${0}:${LINENO}: error: unable to create setup file \"${1}/../include/wx/osx/setup.h\"" exit 1 fi fi # # Check that stock setup0.h is not newer than user setup.h # -if [ "${1}/../include/wx/mac/setup0.h" -nt "${1}/../include/wx/mac/setup.h" ] ; then - echo "${0}:${LINENO}: warning: \"${1}/../include/wx/mac/setup0.h\" is more recent than \"${1}/../include/wx/mac/setup.h\"" - echo "${0}:${LINENO}: warning: edit or replace \"${1}/../include/wx/mac/setup.h\" to integrate changes" +if [ "${1}/../include/wx/osx/setup0.h" -nt "${1}/../include/wx/osx/setup.h" ] ; then + echo "${0}:${LINENO}: warning: \"include/wx/osx/setup0.h\" is more recent than \"include/wx/osx/setup.h\"" + echo "${0}:${LINENO}: warning: edit or replace \"include/wx/osx/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/osx/setup.h" -nt "${2}/include/wx/setup.h" ] ; then + cp "${1}/../include/wx/osx/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