wxWidgets/distrib/mac/pbsetup-sh
Vadim Zeitlin d1810b0dce Remove setup0.h files
Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
2021-01-31 19:02:56 +01:00

41 lines
1.3 KiB
Bash
Executable File

#! /bin/sh
#-----------------------------------------------------------------------------
#-- Name: distrib/mac/pbsetup-sh
#-- Purpose: Copy setup.h for ProjectBuilder
#-- Author: Gilles Depeyrot
#-- Modified by:
#-- Created: 12.09.2003
#-- Copyright: (c) 2003 Gilles Depeyrot
#-- Licence: wxWindows licence
#-----------------------------------------------------------------------------
#
# 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 SYMROOT"
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 user setup.h to build setup.h if the latter doesn't exist or is older
#
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