]> git.saurik.com Git - wxWidgets.git/blame - distrib/mac/pbsetup-sh
Fix return value of wxList::insert() in non-STL builds.
[wxWidgets.git] / distrib / mac / pbsetup-sh
CommitLineData
0b9d8fe1
GD
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#-- RCS-ID: $Id$
9#-- Copyright: (c) 2003 Gilles Depeyrot
10#-- Licence: wxWindows licence
11#-----------------------------------------------------------------------------
12#
7218d34b 13# Usage: $0 SRCROOT SYMROOT
0b9d8fe1
GD
14#
15# Display errors/warnings in the correct format for ProjectBuilder parsing
16#
17if [ $# -ne 2 ] ; then
7218d34b 18 echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT SYMROOT"
0b9d8fe1
GD
19 exit 1
20fi
21#
22# Create wx include directory if necessary
23#
24if [ ! -d "${2}/include/wx" ]; then
25 mkdir -p "${2}/include/wx"
26 if [ ! -d "${2}/include/wx" ] ; then
27 echo "${0}:${LINENO}: error: unable to create directory \"${2}/include/wx\""
28 exit 1
29 fi
30fi
31#
32# Copy stock setup0.h to setup.h if it doesn't exist
33# preserve user modifications made to setup.h
34#
ca91917e
SC
35if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then
36 echo "${0}:${LINENO}: warning: copying \"include/wx/osx/setup0.h\" to \"include/wx/osx/setup.h\""
37 echo "${0}:${LINENO}: warning: edit \"include/wx/osx/setup.h\" to choose the features you would like to compile wxWindows with[out]"
38 cp "${1}/../include/wx/osx/setup0.h" "${1}/../include/wx/osx/setup.h"
39 if [ ! -f "${1}/../include/wx/osx/setup.h" ]; then
40 echo "${0}:${LINENO}: error: unable to create setup file \"${1}/../include/wx/osx/setup.h\""
0b9d8fe1
GD
41 exit 1
42 fi
43fi
44#
45# Check that stock setup0.h is not newer than user setup.h
46#
ca91917e
SC
47if [ "${1}/../include/wx/osx/setup0.h" -nt "${1}/../include/wx/osx/setup.h" ] ; then
48 echo "${0}:${LINENO}: warning: \"include/wx/osx/setup0.h\" is more recent than \"include/wx/osx/setup.h\""
49 echo "${0}:${LINENO}: warning: edit or replace \"include/wx/osx/setup.h\" to integrate changes"
0b9d8fe1
GD
50fi
51#
1c5eeec3 52# Copy user setup.h to build setup.h if the latter doesn't exist or is older
0b9d8fe1 53#
1c5eeec3 54if [ ! -f "${2}/include/wx/setup.h" -o \
ca91917e
SC
55 "${1}/../include/wx/osx/setup.h" -nt "${2}/include/wx/setup.h" ] ; then
56 cp "${1}/../include/wx/osx/setup.h" "${2}/include/wx/setup.h"
1c5eeec3
VZ
57 if [ ! -f "${2}/include/wx/setup.h" ] ; then
58 echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
59 exit 1
8577d8c3
SC
60 fi
61fi