6 APP_DIR
=`cd "$APP_DIR";pwd`; export APP_DIR
13 PLATFORM
=`uname -s`-$ARCH
18 --debug) shift ; DEBUGGER
=gdb
;;
19 --valgrind) shift ; DEBUGGER
=valgrind
;;
22 if [ ! -d "$APP_DIR/src" ] ; then
23 echo "ERROR from $0:" >&2
24 echo "Cannot compile - source code is missing!" >&2
27 echo "Compiling $APP_DIR... please wait..." >&2
28 if [ ! -x "$APP_DIR/src/configure" ]; then
29 echo "No 'configure' script! Trying to run autoconf..."
30 (cd "$APP_DIR/src"; autoconf
)
32 rm -f "$APP_DIR/src/config.cache"
33 cd "$APP_DIR/src" && .
/configure
--enable-rox \
34 --with-platform="$PLATFORM" \
36 && make clean
&& make && echo Done
>&2 && exit 0
37 echo Compile failed
>&2
38 echo Press Return...
>&2
43 BIN
="$APP_DIR/$PLATFORM/$PROG"
45 if [ -x "$BIN" ]; then
46 exec $DEBUGGER "$BIN" "$@"
48 echo "ERROR from $0:" >&2
49 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
50 echo "Trying to compile..." >&2
51 if [ -n "$DISPLAY" ]; then
52 xterm
-e "$0" --compile
56 if [ -x "$BIN" ]; then