axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: axiom--main--1


From: root
Subject: [Axiom-developer] Re: axiom--main--1
Date: Wed, 24 Nov 2004 15:48:39 -0500

Bill,

re: the main branch

The axiom--main--1 branch needs a minor change to the axiom script
to make it start sman rather than AXIOMsys. There are a bunch of
options to sman which I need to document (in the sman.pamphlet).
Once the 'axiom' script calls sman rather than AXIOMsys the graphics
is always available.

I've attached the original form of the axiom command which we are
incrementally approaching. The current axiom command needs to pick
up the parts that handle the graphics options.

We also have to go into the input/Makefile.pamphlet and enable the
test cases which use graphics. These test cases should work but they
need testing. I believe most of them are under the 'SKIP' list
(around line 6420) in the Makefile.pamphlet

I also have been working with the CRC Handbook of Curves and Surfaces
making new test cases by drawing the graphs shown there. Axiom can draw
up to 9 graphs on the same image. I can reproduce some of the examples
but more needs to be done. It is basically tedious testing. I've found
one bug and I'll post it when I get a chance.

t

=================================================================

#!/bin/sh

# Start everything for AXIOM.
#
# axiom
#      [-ht   |-noht]       whether to use HyperDoc
#      [-gr   |-nogr]       whether to use Graphics
#      [-clef |-noclef]     whether to use Clef
#      [-nag |-nonag]       whether to use NAG
#      [-iw   |-noiw]       start in interpreter window
#      [-ihere|-noihere]    start an interpreter buffer in the original window
#      [-nox]               don't use X Windows
#      [-go  |-nogo]        whether to start system
#      [-ws wsname]         use named workspace
#      [-list]              list workspaces only
#      [-grprog fname]      use named program for Graphics
#      [-nagprog fname]     use named program for Nag
#      [-htprog fname]      use named program for HyperDoc
#      [-clefprog fname]    use named program for Clef
#      [-sessionprog fname] use named program for session
#      [-clientprog fname]  use named program for spadclient
#      [-h]                 show usage
#
#

MALLOCTYPE=3.1
export MALLOCTYPE

# 0. Basic utilities

ciao() {
        echo "Goodbye."
        exit 1
}

needsubopt () {
        echo "The $1 option requires an argument."
        ciao
}

colonjoin() {
        if [ "$1" = "" ] ; then
                echo "$2"
        elif [ "$2" = "" ] ; then
                echo "$1"
        else
                echo "$1:$2"
        fi
}

showuse() {
echo "axiom"
echo "     [-ht   |-noht]       whether to use HyperDoc"
echo "     [-gr   |-nogr]       whether to use Graphics"
echo "     [-clef |-noclef]     whether to use Clef"
echo "     [-nag |-nonag]       whether to use NAG"
echo "     [-iw   |-noiw]       start in interpreter window"
echo "     [-ihere|-noihere]    start an interpreter buffer in the original 
window."
echo "     [-nox]               don't use X Windows"
echo "     [-go  |-nogo]        whether to start system"
echo "     [-ws wsname]         use named workspace"
echo "     [-list]              list workspaces only"
#echo "     [-grprog fname]      use named program for Graphics"
#echo "     [-nagprog fname]      use named program for Nag"
#echo "     [-htprog fname]      use named program for HyperDoc"
#echo "     [-clefprog fname]    use named program for Clef"
#echo "     [-sessionprog fname] use named program for session"
#echo "     [-clientprog fname]  use named program for spadclient"
echo "     [-h]                 show usage"
}

# 1. Ensure the environment is set.

# Just process '-h'

if [ "$*" = "-h" ] ; then
     showuse
fi
SPADDEFAULT=/users/axiom/development/mnt/linuxglibc2.1

if [ "$AXIOM" = "" ] ; then
    echo "Your AXIOM shell variable is not set"
    echo "Trying to use the default of $SPADDEFAULT"
    AXIOM=$SPADDEFAULT
    export AXIOM
fi

if [ ! -d "$AXIOM" ] ; then
  echo "The directory for AXIOM, $AXIOM, does not exist."
  ciao
fi

SPAD=$AXIOM
export SPAD
ASHARPROOT=$AXIOM/asharp
export ASHARPROOT
PATH=$ASHARPROOT/bin:$PATH
export PATH


# Name the workspace directories.
rootwsdir=$AXIOM/bin
PATH=$rootwsdir:$PATH
export PATH

# 2. Process command line arguments.

# Defaults for command-line arguments.
# (Default workspace is depends on presence of -comp.)
list=no
comp=no
go=yes
wsname=AXIOMsys

asserts=""
incldirs=""
libdirs=""
compfiles=""
otheropts=""

while [ "$*" != "" ] ; do

        case $1 in
        -go)    go=yes ;;
        -nogo)  go=no ;;

        -ws)
                if [ "$2" = "" ] ; then needsubopt "$1" ; fi
                shift
                wsname="$1"
                ;;

        -nagprog|-grprog|-htprog|-clefprog|-sessionprog|-clientprog|-paste)
                if [ "$2" = "" ] ; then needsubopt "$1" ; fi
                otheropts="$otheropts $1 $2"
                shift
                ;;
        
-clef|-noclef|-gr|-nogr|-ht|-noht|-iw|-noiw|-ihere|-noihere|-nox|-nag|-nonag)
                otheropts="$otheropts $1"
                ;;

        -h)
                go=no
                ;;
        -comp)  otheropts="$otheropts -nox"
                wsname=comp
                comp=yes
                ;;

        -[AIL])
                if [ $comp = no ] ; then
                        echo "The option $1 may only be given after -comp."
                        ciao
                fi

                if [ "$2" = "" ] ; then needsubopt "$1" ; fi

                case $1 in
                -A) asserts=`colonjoin "$asserts" "$2"` ;;
                -L) libdirs=`colonjoin "$libdirs" "$2"` ;;
                -I) incldirs=`colonjoin "$incldirs" "$2"` ;;
                esac

                shift
                ;;

        *.*)
                if [ $comp = no ] ; then
                        echo "File names ($1) may only be given after -comp."
                        ciao
                fi
                compfiles=`colonjoin "$compfiles" "$1"`
                ;;

        *)      echo "Unknown option: $1"
                echo "To use a specific workspace use, e.g.: AXIOM -ws $1"
                ciao
                ;;
        esac

        shift
done

# 5. Try to ensure a suitable workspace on this host.

if [ `expr $wsname : '.*/.*'` = 0 ] ; then
        serverws=$rootwsdir/$wsname
else
        serverws=$wsname
fi

if [ ! -f $serverws ] ; then
        echo "Cannot proceed without local workspace $localws."
        ciao
fi

# 6. Start processes

if [ $go = no ] ; then
        echo "Would now start the processes."
        exit 0
fi

echo "Starting the AXIOM Computer Algebra System (NAG Development Version)"
echo "Linux (glibc2.1) for Intel"
exec $AXIOM/lib/sman $otheropts -ws $serverws








reply via email to

[Prev in Thread] Current Thread [Next in Thread]