7 if [ "$APP_DIR" = "$0" ] ; then APP_DIR
=.
; fi
8 APP_DIR
=`cd $APP_DIR;pwd`; export APP_DIR
10 PLATFORM
=`unset HOSTTYPE; unset OSTYPE; bash -c 'echo $OSTYPE-$HOSTTYPE'`
14 --debug) shift ; DEBUGGER
=gdb
;;
16 if [ ! -d $APP_DIR/src
] ; then
17 echo "ERROR from $0:" >&2
18 echo "Cannot compile - source code is missing!" >&2
21 echo "Compiling $APP_DIR... please wait..." >&2
22 rm -f $APP_DIR/src
/config.cache
23 cd $APP_DIR/src
&& .
/configure
--bindir=$APP_DIR/$PLATFORM \
24 && make clean
&& make && echo Done
>&2 && exit 0
25 echo Compile failed
>&2
29 BIN
=$APP_DIR/$PLATFORM/$PROG
32 exec $DEBUGGER $BIN $
*
34 echo "ERROR from $0:" >&2
35 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
36 echo "Try using the --compile option." >&2