Roxen.git/
server/
start
Branch:
Tag:
Non-build tags
All tags
No tags
1999-09-05
1999-09-05 02:19:34 by Per Hedbor <ph@opera.com>
221398abddb9470e9b87b97e02374210fcd5b145 (
28
lines) (+
25
/-
3
)
[
Show
|
Annotate
]
Branch:
5.2
Automatically remove .o files if pike arguments or pike version change
Rev: server/start:1.75
1:
#!/bin/sh #
-
# $Id: start,v 1.
74
1999/09/05
01
:
34
:
43
per Exp $
+
# $Id: start,v 1.
75
1999/09/05
02
:
19:
34 per Exp $
pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` : "
123:
verbose=2 debug=1 ;;
+
'--remove-dumped')
+
remove_old_dot_o_files "user request"
+
;;
'--once') once=1 ;;
175:
.B--help -?B.: This information.
+
.B--remove-dumpedB.: Remove all dumped code, thus forcing
+
a recompile.
+
.B--verbose -vB.: Enable more verbose messages. .B--quiet -qB.: Disable most of the messages.
382:
# Some useful functions #
+
remove_old_dot_o_files () {
+
echo "$pre Removing old .o files ($1)"
+
find . -name '*.o' | xargs rm -f
+
}
+
+
rotate () { b=5; for a in 4 3 2 1 ; do mv -f $1.$a $1.$b 2> /dev/null; b=$a; done
389:
start_roxen() { if [ "x$DIR" != "x../configurations/" ] ; then
-
args="
$DEBUG
$DEFINES $program --config-dir=$DIR $pass"
+
args="$DEFINES $program --config-dir=$DIR $pass"
else
-
args="
$DEBUG
$DEFINES $program $pass"
+
args="$DEFINES $program $pass"
fi if [ x$cd_to != x ] ; then cd $cd_to
426:
DEBUG=""; else :; fi
+
DEFINES="$DEBUG $DEFINES"
+
PIKEVERSION=`$pike --version 2>&1`
+
+
if [ "`cat .old_roxen_defines 2>/dev/null`" != "$PIKEVERSION $DEFINES" ] ; then
+
remove_old_dot_o_files "DEFINES changed"
+
fi
+
+
echo "$PIKEVERSION $DEFINES" > .old_roxen_defines
+
if [ -z "$once" ] ; then if [ $verbose -gt 0 ]; then echo $pre Starting the Roxen Challenger World Wide Web server.