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