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";;
27 --leaks) shift ; DEBUGGER
="valgrind --num-callers=8 --leak-check=yes";;
30 if [ ! -d "$APP_DIR/src" ] ; then
31 echo "ERROR from $0:" >&2
32 echo "Cannot compile - source code is missing!" >&2
35 echo "Compiling $APP_DIR... please wait..." >&2
36 if [ ! -x "$APP_DIR/src/configure" ]; then
37 echo "No 'configure' script! Trying to run autoconf..."
38 (cd "$APP_DIR/src"; autoconf
)
40 rm -f "$APP_DIR/src/config.cache"
41 cd "$APP_DIR/src" && .
/configure
--enable-rox \
42 --with-platform="$PLATFORM" \
44 && make clean
&& make && echo Done
>&2 && exit 0
45 echo Compile failed
>&2
46 echo Press Return...
>&2
51 if [ -z "$XDG_DATA_DIRS" -a -d /uri
/0install
/zero-install.sourceforge.net
]; then
52 # Try to get MIME database through Zero Install, if possible
53 0refresh zero-install.sourceforge.net
/share
/mime
2003-08-07
54 XDG_DATA_DIRS
=/usr
/local
/share
/:/usr
/share
/:/uri
/0install
/zero-install.sourceforge.net
/share
58 BIN
="$APP_DIR/$PLATFORM/$PROG"
60 if [ -x "$BIN" ]; then
61 exec $DEBUGGER "$BIN" $DEBUG_OPTIONS "$@"
63 echo "ERROR from $0:" >&2
64 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
65 echo "Trying to compile..." >&2
66 if [ -n "$DISPLAY" ]; then
67 xterm
-e "$0" --compile
71 if [ -x "$BIN" ]; then