source: trunk/environment.sh @ 130

Last change on this file since 130 was 130, checked in by rosiere, 15 years ago

1) add MORPHEO_PREFIX

  • Property svn:keywords set to Id
File size: 1.7 KB
RevLine 
[2]1#!/bin/sh
2
[15]3declare OS_FOUND=`uname -s`-`uname -m | sed -e 's/i[0-9]/iX/' -e 's/sun4./sun4X/'`
4
5case ${OS_FOUND} in
[59]6#    "SunOS-sun4X")
7#       export TARGET_ARCH=gccsparcOS5
8#       export EXE_SUFFIX=
9#       ;;
[2]10    "Linux-iX86")
11        export TARGET_ARCH=linux
12        export EXE_SUFFIX=
13        ;;
[59]14#    "FreeBSD-iX86")
15#       export TARGET_ARCH=freebsd
16#       export EXE_SUFFIX=
17#       ;;
18#    "CYGWIN_NT-5.1-iX86")
19#       export TARGET_ARCH=cygwin
20#       export EXE_SUFFIX=.exe
21#       ;;     
[2]22    *) 
23     echo "Unknown OS found"
24esac
25
[15]26# Export environement
[79]27export MORPHEO_TOPLEVEL=${PWD}
[82]28export MORPHEO_SCRIPT=${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Script
[88]29export MORPHEO_HOME=${HOME}/.Morpheo
[130]30export MORPHEO_PREFIX=/users/chaos/kane/Morpheo
[123]31#export MORPHEO_TMP=${HOME}/tmp/Morpheo
[130]32#export MORPHEO_TMP=/dsk/l1/misc/Morpheo
33export MORPHEO_TMP=${MORPHEO_PREFIX}
[88]34       MORPHEO_XTTY=${MORPHEO_TOPLEVEL}/IPs/systemC/Environment/TTY/xtty
[2]35
[15]36echo ""
[88]37echo "OS found : ${OS_FOUND}"
[2]38echo ""
[88]39echo "Modification of environement's variable :"
40echo " - MORPHEO_TOPLEVEL is set to ${MORPHEO_TOPLEVEL}"
41echo " - MORPHEO_SCRIPT   is set to ${MORPHEO_SCRIPT}"
42echo " - MORPHEO_HOME     is set to ${MORPHEO_HOME}"
[130]43echo " - MORPHEO_PREFIX   is set to ${MORPHEO_PREFIX}"
[88]44echo " - MORPHEO_TMP      is set to ${MORPHEO_TMP}"
[15]45
[88]46#----------
47# Path : add xtty and script directory.
48#        test if already in path : no multiple addition
49#----------
[81]50
[15]51echo ${PATH} |grep -q ${MORPHEO_SCRIPT};
52if test $? -eq 1; then
[79]53    export  PATH=${PATH}:${MORPHEO_SCRIPT}
[88]54    echo " - PATH             add       ${MORPHEO_SCRIPT}"
[15]55fi;
56
[81]57echo ${PATH} |grep -q ${MORPHEO_XTTY};
58
59if test $? -eq 1; then
60    export  PATH=${PATH}:${MORPHEO_XTTY}
[88]61    echo " - PATH             add       ${MORPHEO_XTTY}"
[81]62fi;
63
[15]64echo ""
Note: See TracBrowser for help on using the repository browser.