]> git.saurik.com Git - wxWidgets.git/commitdiff
Shell Script file to copy setup.h for ProjectBuilder
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 12 Sep 2003 20:24:53 +0000 (20:24 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 12 Sep 2003 20:24:53 +0000 (20:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/mac/pbsetup-sh [new file with mode: 0755]

diff --git a/distrib/mac/pbsetup-sh b/distrib/mac/pbsetup-sh
new file mode 100755 (executable)
index 0000000..e81926e
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+#-----------------------------------------------------------------------------
+#-- Name:        distrib/mac/pbsetup-sh
+#-- Purpose:     Copy setup.h for ProjectBuilder
+#-- Author:      Gilles Depeyrot
+#-- Modified by:
+#-- Created:     12.09.2003
+#-- RCS-ID:      $Id$
+#-- Copyright:   (c) 2003 Gilles Depeyrot
+#-- Licence:     wxWindows licence
+#-----------------------------------------------------------------------------
+#
+# Usage: $0 SRCROOT DERIVED_SOURCES_DIR
+#
+# Display errors/warnings in the correct format for ProjectBuilder parsing
+#
+if [ $# -ne 2 ] ; then
+    echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT DERIVED_SOURCES_DIR"
+    exit 1
+fi
+#
+# Create wx include directory if necessary
+#
+if [ ! -d "${2}/include/wx" ]; then
+    mkdir -p "${2}/include/wx"
+    if [ ! -d "${2}/include/wx" ] ; then
+        echo "${0}:${LINENO}: error: unable to create directory \"${2}/include/wx\""
+        exit 1
+    fi
+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\""
+        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"
+fi
+#
+# Copy setup.h to setup.h if setup.h doesn't exist
+#
+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