]> git.saurik.com Git - wxWidgets.git/blob - build/update-setup-h
define wxUSE_GUI as 0 when --disable-gui is used
[wxWidgets.git] / build / update-setup-h
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
13 rc=0
14
15 error()
16 {
17 echo $* 1>&2
18 }
19
20 update_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
35 if [ ! -f wxwin.m4 ]; then
36 error "$0: must be ran from root wx directory"
37 exit 1
38 fi
39
40 update_single_setup_h include/wx/msw/setup0.h
41 update_single_setup_h include/wx/mac/setup0.h
42
43 # get rid of C++ comments in this file
44 update_single_setup_h setup.h.in
45 sed -i -e '/^\/\//d' -e 's@ *//.*$@@' setup.h.in
46
47 exit $rc
48
49 # vi: set ft=sh: