#! /bin/csh -f
# echo "setpaths.csh -- version J. Stolfi Linux 2.2.3"
# Last edited on 2008-02-04 13:15:52 by stolfi

# Assumes the following environment variables have been set:
#    $ARCH, $OS, $HOSTNAME $PLATFORM
# Sets $PATH (and path), $MANPATH, $LD_LIBRARY_PATH,
# and the package locations: $GNU_PUB, etc.

# === SEARCH PATHS =======================================================

# Add my program directories to the front of the search path:

set mypath = ( \
    . \
    ../tools ../../tools \
    ${STOLFIHOME}/bin/${PLATFORM} ${STOLFIHOME}/bin \
  )

set path = ( ${mypath} ${path} )

# MANPATH is the search path for manual pages. 
# Since it overrides the default, we must provide the default as well.
set mymanpath = "${STOLFIHOME}/man/${PLATFORM}:${STOLFIHOME}/man"
if ( ! $?MANPATH ) then
  setenv MANPATH "/usr/kerberos/man:/usr/local/share/man:/usr/share/man:/usr/man"
endif
setenv MANPATH "${mymanpath}:${MANPATH}"

# LD_LIBRARY_PATH is used in some systems to look for ".so" files.
# It does not override the systems library, so we do not need to provide them. 
setenv myldpath "${STOLFIHOME}/lib/${PLATFORM}"
if ( $?LD_LIBRARY_PATH ) then
  setenv LD_LIBRARY_PATH "${myldpath}:${LD_LIBRARY_PATH}"
else
  setenv LD_LIBRARY_PATH "${myldpath}"
endif

setenv TEXINPUTS ".:${STOLFIHOME}/tex/inputs:"
