]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/setup/general/createall
Some manual updates; in MDI sample, child frames now have default size/position ...
[wxWidgets.git] / src / gtk / setup / general / createall
1 #! /bin/sh
2
3 OS=$OSTYPE
4
5 if test "x$OS" = x; then
6 echo "please set the environment variable OSTYPE "
7 echo "to a value appropriate for your system."
8 echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh"
9 echo " export OSTYPE=`uname` for other shells"
10 exit 1
11 fi
12
13 TMP_CONT=`ls src`
14 SRC_DIR=src
15 for each in $TMP_CONT; do
16 if test -d src/$each ; then
17 SRC_DIR="$SRC_DIR src/$each"
18 fi
19 done
20
21 TMP_CONT=`ls samples`
22 SAMPLES_DIR=
23 for each in $TMP_CONT; do
24 if test -d samples/$each ; then
25 SAMPLES_DIR="$SAMPLES_DIR samples/$each"
26 fi
27 done
28
29 TMP_CONT=`ls utils`
30 UTILS_DIR=
31 for each in $TMP_CONT; do
32 if test -d utils/$each ; then
33 UTILS_DIR="$UTILS_DIR utils/$each"
34 fi
35 done
36
37 TMP_CONT=`ls user`
38 USER_DIR=
39 for each in $TMP_CONT; do
40 if test -d user/$each ; then
41 USER_DIR="$USER_DIR user/$each"
42 fi
43 done
44
45 ALL_DIR="$SRC_DIR $SAMPLES_DIR $UTILS_DIR $USER_DIR"
46
47 echo Creating for: $OS
48
49 # create defaults
50 if test ! -d src/gtk/setup/$OS; then
51 mkdir src/gtk/setup/$OS
52 fi
53
54 SUBSTFILE=src/gtk/setup/$OS/substit
55
56 # the substit file first
57 if test -f src/gtk/setup/substit ; then
58 cat src/gtk/setup/substit | sed "s/*/@/g" > $SUBSTFILE;
59 rm -f src/gtk/setup/substit
60 fi
61 # now the template file
62 cat src/gtk/setup/maketmpl.in | sed -f $SUBSTFILE > src/gtk/setup/$OS/maketmpl
63
64 # now the config header file
65 #if test -f setup/wx_setup.h ; then
66 # cat setup/wx_setup.h > setup/$OS/wx_setup.h;
67 # rm -f setup/wx_setup.h
68 #fi
69
70 # create lib and bin directory
71 if test ! -d lib; then
72 mkdir lib
73 fi
74 if test ! -d lib/$OS; then
75 mkdir lib/$OS
76 fi
77 if test ! -d bin; then
78 mkdir bin
79 fi
80 if test ! -d bin/$OS; then
81 mkdir bin/$OS
82 fi
83
84 # create makefiles
85 for each in $ALL_DIR; do
86 DIR=$each/$OS
87 # create Makefile in directory
88 if test -r $each/Makefile.in ; then
89 # create directory
90 if test ! -d $DIR; then
91 echo "Creating Directory: $DIR..."
92 mkdir $DIR
93 fi
94 echo "Creating: $DIR/Makefile..."
95 cat $each/Makefile.in | sed -f $SUBSTFILE > $DIR/Makefile
96 (cd $DIR; make subdirs > /dev/null;)
97 fi
98 done