]> git.saurik.com Git - wxWidgets.git/blob - distrib/mac/pbsetup-sh
skip apple options
[wxWidgets.git] / distrib / mac / pbsetup-sh
1 #! /bin/sh
2 #-----------------------------------------------------------------------------
3 #-- Name: distrib/mac/pbsetup-sh
4 #-- Purpose: Copy setup.h for ProjectBuilder
5 #-- Author: Gilles Depeyrot
6 #-- Modified by:
7 #-- Created: 12.09.2003
8 #-- Copyright: (c) 2003 Gilles Depeyrot
9 #-- Licence: wxWindows licence
10 #-----------------------------------------------------------------------------
11 #
12 # Usage: $0 SRCROOT SYMROOT
13 #
14 # Display errors/warnings in the correct format for ProjectBuilder parsing
15 #
16 if [ $# -ne 2 ] ; then
17 echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT SYMROOT"
18 exit 1
19 fi
20 #
21 # Create wx include directory if necessary
22 #
23 if [ ! -d "${2}/include/wx" ]; then
24 mkdir -p "${2}/include/wx"
25 if [ ! -d "${2}/include/wx" ] ; then
26 echo "${0}:${LINENO}: error: unable to create directory \"${2}/include/wx\""
27 exit 1
28 fi
29 fi
30 #
31 # Copy stock setup0.h to setup.h if it doesn't exist
32 # preserve user modifications made to setup.h
33 #
34 if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then
35 echo "${0}:${LINENO}: warning: copying \"include/wx/osx/setup0.h\" to \"include/wx/osx/setup.h\""
36 echo "${0}:${LINENO}: warning: edit \"include/wx/osx/setup.h\" to choose the features you would like to compile wxWindows with[out]"
37 cp "${1}/../include/wx/osx/setup0.h" "${1}/../include/wx/osx/setup.h"
38 if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then
39 echo "${0}:${LINENO}: error: unable to create setup file \"${1}/../include/wx/osx/setup.h\""
40 exit 1
41 fi
42 fi
43 #
44 # Check that stock setup0.h is not newer than user setup.h
45 #
46 if [ "${1}/../include/wx/osx/setup0.h" -nt "${1}/../include/wx/osx/setup.h" ] ; then
47 echo "${0}:${LINENO}: warning: \"include/wx/osx/setup0.h\" is more recent than \"include/wx/osx/setup.h\""
48 echo "${0}:${LINENO}: warning: edit or replace \"include/wx/osx/setup.h\" to integrate changes"
49 fi
50 #
51 # Copy user setup.h to build setup.h if the latter doesn't exist or is older
52 #
53 if [ ! -f "${2}/include/wx/setup.h" -o \
54 "${1}/../include/wx/osx/setup.h" -nt "${2}/include/wx/setup.h" ] ; then
55 cp "${1}/../include/wx/osx/setup.h" "${2}/include/wx/setup.h"
56 if [ ! -f "${2}/include/wx/setup.h" ] ; then
57 echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
58 exit 1
59 fi
60 fi