6 APP_DIR
=`cd "$APP_DIR";pwd`; export APP_DIR
13 PLATFORM
=`uname -s`-$ARCH
19 if [ "$#" == 0 ] ; then
20 DEBUGGER
="gdb --args" ; DEBUG_OPTIONS
="-n --g-fatal-warnings"
24 --valgrind) shift ; DEBUGGER
="valgrind --num-callers=8";;
27 if [ ! -d "$APP_DIR/src" ] ; then
28 echo "ERROR from $0:" >&2
29 echo "Cannot compile - source code is missing!" >&2
32 echo "Compiling $APP_DIR... please wait..." >&2
33 if [ ! -x "$APP_DIR/src/configure" ]; then
34 echo "No 'configure' script! Trying to run autoconf..."
35 (cd "$APP_DIR/src"; autoconf
)
37 rm -f "$APP_DIR/src/config.cache"
38 cd "$APP_DIR/src" && .
/configure
--enable-rox \
39 --with-platform="$PLATFORM" \
41 && make clean
&& make && echo Done
>&2 && exit 0
42 echo Compile failed
>&2
43 echo Press Return...
>&2
48 if [ -z "$XDG_DATA_DIRS" -a -d /uri
/0install
/zero-install.sourceforge.net
]; then
49 # Try to get MIME database through Zero Install, if possible
50 0refresh zero-install.sourceforge.net
/share
/mime
2003-08-07
51 XDG_DATA_DIRS
=/usr
/local
/share
/:/usr
/share
/:/uri
/0install
/zero-install.sourceforge.net
/share
55 BIN
="$APP_DIR/$PLATFORM/$PROG"
57 if [ -x "$BIN" ]; then
58 exec $DEBUGGER "$BIN" $DEBUG_OPTIONS "$@"
60 echo "ERROR from $0:" >&2
61 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
62 echo "Trying to compile..." >&2
63 if [ -n "$DISPLAY" ]; then
64 xterm
-e "$0" --compile
68 if [ -x "$BIN" ]; then