]> git.saurik.com Git - wxWidgets.git/blame - build/update-setup-h
define wxUSE_GUI as 0 when --disable-gui is used
[wxWidgets.git] / build / update-setup-h
CommitLineData
ff3a660b
VZ
1#!/bin/sh
2##############################################################################
3# Name: build/update-setup.h
4# Purpose: run from root wx directory to update wx/*/setup.h files: those
5# having special comment markers in them will be update using
6# include/wx/setup_inc.h contents
7# Created: 2005-01-15
8# RCS-ID: $Id$
9# Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
10# Licence: wxWindows licence
11##############################################################################
12
13rc=0
14
15error()
16{
17 echo $* 1>&2
18}
19
20update_single_setup_h()
21{
22 tmp=$i.$$.tmp
23 sed -e '/^\/\* --- start common options --- \*\/$/q' $1 > $tmp &&
24 cat include/wx/setup_inc.h >> $tmp &&
25 sed -n -e '/^\/\* --- end common options --- \*\/$/,$p' $1 >> $tmp &&
26 mv $tmp $1
27
28 if [ $? -ne 0 ]; then
29 error "$0: failed to update file $1"
30 rc=2
31 fi
32}
33
34# entry point
35if [ ! -f wxwin.m4 ]; then
36 error "$0: must be ran from root wx directory"
37 exit 1
38fi
39
40update_single_setup_h include/wx/msw/setup0.h
8d8f077e 41update_single_setup_h include/wx/mac/setup0.h
ff3a660b
VZ
42
43# get rid of C++ comments in this file
2fddf893
VZ
44update_single_setup_h setup.h.in
45sed -i -e '/^\/\//d' -e 's@ *//.*$@@' setup.h.in
ff3a660b
VZ
46
47exit $rc
8d8f077e
VZ
48
49# vi: set ft=sh: