2003-09-12 16:24:53 -04:00
|
|
|
#! /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
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
#
|
2003-09-13 08:01:11 -04:00
|
|
|
# Usage: $0 SRCROOT SYMROOT
|
2003-09-12 16:24:53 -04:00
|
|
|
#
|
|
|
|
# Display errors/warnings in the correct format for ProjectBuilder parsing
|
|
|
|
#
|
|
|
|
if [ $# -ne 2 ] ; then
|
2003-09-13 08:01:11 -04:00
|
|
|
echo "${0}:${LINENO}: error: Usage: ${0} SRCROOT SYMROOT"
|
2003-09-12 16:24:53 -04:00
|
|
|
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
|
2003-09-13 08:01:11 -04:00
|
|
|
echo "${0}:${LINENO}: warning: copying \"include/wx/mac/setup0.h\" to \"include/wx/mac/setup.h\""
|
|
|
|
echo "${0}:${LINENO}: warning: edit \"include/wx/mac/setup.h\" to choose the features you would like to compile wxWindows with[out]"
|
2003-09-12 16:24:53 -04:00
|
|
|
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
|
2003-09-13 08:01:11 -04:00
|
|
|
echo "${0}:${LINENO}: warning: \"include/wx/mac/setup0.h\" is more recent than \"include/wx/mac/setup.h\""
|
|
|
|
echo "${0}:${LINENO}: warning: edit or replace \"include/wx/mac/setup.h\" to integrate changes"
|
2003-09-12 16:24:53 -04:00
|
|
|
fi
|
|
|
|
#
|
2007-07-11 11:50:41 -04:00
|
|
|
# Copy user setup.h to build setup.h if newer or non existant
|
2003-09-12 16:24:53 -04:00
|
|
|
#
|
2007-07-11 11:50:41 -04:00
|
|
|
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
|
2003-09-12 16:24:53 -04:00
|
|
|
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
|