Branch: Tag:

2000-03-13

2000-03-13 06:08:25 by Per Hedbor <ph@opera.com>

o Precompiled files now in ../var/roxen-version/precompiled/machine/

o If ../local/bin/{pike,roxen} exists, use them instead of the ones in
bin/

o .o files are removed in each loop in the restart loop if
--remove-dumped is specified.

o ../local/{include,pike_modules} are now searched for include files
and modules, respectively.

o ../local/base_server is added to the program path if it exists.

Rev: server/start:1.99

1:   #!/bin/sh   # - # $Id: start,v 1.98 2000/03/10 18:07:22 mast Exp $ + # $Id: start,v 1.99 2000/03/13 06:08:25 per Exp $      pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` :"   
13:   program=base_server/roxenloader.pike   extra_args=""    - pcdir="precompiled/`uname -m`.`uname -r`" + roxen_version() { +  VERSION="`sed <etc/include/version.h -e'/__roxen_version__/s/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" +  BUILD="`sed <etc/include/version.h -e'/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" +  echo $VERSION.$BUILD + } +  + pcdir="../var/`roxen_version`/precompiled/`uname -m`.`uname -r`"   old_roxen_defines="$pcdir/old_roxen_defines"   ./mkdir -p $pcdir   
36:   pike=`type pike|head -1|sed -e 's,.*is ,,'`   if [ -x bin/pike ] ; then pike=$roxendir/bin/pike; fi   if [ -x bin/roxen ] ; then pike=$roxendir/bin/roxen; fi + if [ -x ../local/bin/pike ] ; then pike=$roxendir/../local/bin/pike; fi + if [ -x ../local/bin/roxen ] ; then pike=$roxendir/../local/bin/roxen; fi   if [ "x$PIKE" = "x" ]; then :; else    if [ -x "$PIKE" ]; then pike="$PIKE"; fi   fi
74:    find $pcdir -name '*.o' | xargs rm -f   }    -  +    ## Parse all arguments.   ## GNU-style, long options only, except for -D, simply passed on.   ARGS=""
143:    debug=1    ;;    '--remove-dumped') -  remove_old_dot_o_files "user request" +  remove_dumped=1;    ;;    '--once')    once=1
179:    ;;    '--version')    if [ -f base_server/roxen.pike ]; then -  VERSION="`sed <etc/include/version.h -e'/__roxen_version__/s/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" -  BUILD="`sed <etc/include/version.h -e'/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" -  echo "Roxen $VERSION.$BUILD" +  echo "Roxen `roxen_version`"    exit 0    else    echo 'base_server/roxen.pike not found!'
395:    DEFINES="$DEFINES -I$roxendir/etc/include"   fi    + if [ -d ../local/include ]; then +  DEFINES="$DEFINES -I$roxendir/../local/include" + fi +    # Extra include-path (2)   if [ -d base_server ]; then    DEFINES="$DEFINES -I$roxendir/base_server"   fi    -  + if [ -d ../local/base_server ]; then +  DEFINES="$DEFINES -I$roxendir/../local/base_server -P$roxendir/../local/base_server" + fi +    # Extra program-path   DEFINES="$DEFINES -P`pwd`"   
458:   }      start_roxen() { +  if [ x$remove_dumped = x1 ] ; then +  remove_old_dot_o_files "user request" +  fi    if [ "x$DIR" != "x../configurations/" ] ; then    args="$DEFINES $ARGS $program --config-dir=$DIR $pass"    else