]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/setup/general/createall
Initial revision
[wxWidgets.git] / src / gtk / setup / general / createall
CommitLineData
c801d85f
KB
1#! /bin/sh
2
3OS=$OSTYPE
4
5if 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
11fi
12
13TMP_CONT=`ls src`
14SRC_DIR=src
15for each in $TMP_CONT; do
16 if test -d src/$each ; then
17 SRC_DIR="$SRC_DIR src/$each"
18 fi
19done
20
21TMP_CONT=`ls samples`
22SAMPLES_DIR=
23for each in $TMP_CONT; do
24 if test -d samples/$each ; then
25 SAMPLES_DIR="$SAMPLES_DIR samples/$each"
26 fi
27done
28
29TMP_CONT=`ls utils`
30UTILS_DIR=
31for each in $TMP_CONT; do
32 if test -d utils/$each ; then
33 UTILS_DIR="$UTILS_DIR utils/$each"
34 fi
35done
36
37TMP_CONT=`ls user`
38USER_DIR=
39for each in $TMP_CONT; do
40 if test -d user/$each ; then
41 USER_DIR="$USER_DIR user/$each"
42 fi
43done
44
45ALL_DIR="$SRC_DIR $SAMPLES_DIR $UTILS_DIR $USER_DIR"
46
47echo Creating for: $OS
48
49# create defaults
50if test ! -d src/gtk/setup/$OS; then
51 mkdir src/gtk/setup/$OS
52fi
53
54SUBSTFILE=src/gtk/setup/$OS/substit
55
56# the substit file first
57if test -f src/gtk/setup/substit ; then
58 cat src/gtk/setup/substit | sed "s/*/@/g" > $SUBSTFILE;
59 rm -f src/gtk/setup/substit
60fi
61# now the template file
62cat 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
71if test ! -d lib; then
72 mkdir lib
73fi
74if test ! -d lib/$OS; then
75 mkdir lib/$OS
76fi
77if test ! -d bin; then
78 mkdir bin
79fi
80if test ! -d bin/$OS; then
81 mkdir bin/$OS
82fi
83
84# create makefiles
85for 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
98done