[Bio] / ReleaseTools / RTPath.csh Repository:
ViewVC logotype

View of /ReleaseTools/RTPath.csh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (download) (as text) (annotate)
Fri May 6 21:44:38 2005 UTC (14 years, 7 months ago) by efrank
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, rast_rel_2014_0912, rast_rel_2008_06_18, rast_rel_2008_06_16, mgrast_dev_04082011, Root-bobdev_news, merge-trunktag-bobdev_news-2, merge-trunktag-bobdev_news-1, rast_rel_2009_05_18, rast_rel_2009_0925, rast_rel_2010_0118, preTreatmanDyn, merge-trunktag-bodev_news-3, rast_rel_2009_02_05, rast_rel_2011_0119, rast_rel_2008_12_18, rast_rel_2008_10_09, rast_release_2008_09_29, mgrast_rel_2008_0919, rast_rel_2009_07_09, rast_rel_2011_0928, mgrast_rel_2008_0917, mgrast_dev_04052011, merge-bodev_news-3, mobedac_release_05302012, rast_rel_2010_0928, mgrast_version_3_2, caBIG-05Apr06-00, mgrast_dev_02212011, mgrast_rel_2008_0625, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, merge-bobdev_news-2, merge-bobdev_news-1, mgrast_dev_05262011, mgrast_rel_2008_0806, rast_rel_2008_08_07, myrast_33, rast_rel_2008_09_29, mgrast_dev_02222011, mgrast_dev_10262011, rast_rel_2008_11_24, mgrast_dev_06072011, rast_rel_2008_09_30, before-dynamics-persistence, rast_rel_2008_10_29, rast_rel_2014_0729, mgrast_dev_03252011, mgrast_release_3_0, rast_rel_2010_1206, mgrast_rel_2008_0924, lwc, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, makeScriptHeaders, rast_rel_2008_07_21, mgrast_rel_2008_0923, mgrast_release_3_0_1, rast_rel_2010_0827, rast_rel_2009_03_26, rast_2008_0924, mgrast_dev_12152011, rast_rel_2010_0526, rast_rel_2008_04_23, caBIG-00-00-00, mgrast_rel_2008_1110_v2, mgrast_dev_04012011, treatman-lastDay-0, mgrast_rel_2008_1110, caBIG-13Feb06-00, HEAD
Branch point for: Branch-bobdev_news
Changes since 1.4: +2 -2 lines
move workdir release paths up to top in precedence.

#############################################################################
#
# The goal is to set various path env variables to control search order
# under the release tools.
#
# USAGE:
#    o run from inside a work directory
#    o Have RTDIST, RTCURRENT defined.  Also, RTSITEOVERRIDE, if needed
#   
#    source RTPATH
#
#
# DETAILS:
#
#    We care about:
#   
#       path                 affects locating release programs, tools
#       PYTHONPATH           affects loading of built code
#       LD_LIBRARY_PATH      as for PYTHONPATH.** Not used  yet, thank heavens
#   
#    The search order is as follows, and this defines levels of overrides
#   
#       1. working directory
#       2. site overrides       not implemented yet.
#       3. base release
#   
#    Thus, anything checked out (in case its modified) wins out over 
#    everything. Anything in site-level config comes next. This allows the 
#    site to do config that is perhaps more tricky than
#    a typical user cares to know about.  Finally comes base release, allowing
#    us to ship releases with reasonable defaults (or examples).
#   
#    Site overrides work by keying off of RTSITEOVERRIDE environment variable.
#    That's just a path that points to the overrides. We look in there for
#    a subdirectory with the current release name (RTCURRENT).
#   
#    So, the end result is something like
#   
#         ${PWD}/${RTARCH}/bin:${RTSITEOVERRIDE}/${RTCURRENT}/${RTARCH}/bin:
#                         ${RTDIST}/releases/${RTCURRENT}/${RTARCH}/bin
#     
#    or with bin->lib, as needed.
#    
# HISTORY:
#    06Feb04  efrank       first version
#
# BUGS
#    o We don't want the paths to get longer and longer if RTPath is called
#      multiple times, e.g., if you change to a new working directory. We
#      have a  KLUDGE for the moment: we stick RTMARKER as a literal into
#      the path to sandwhich what we put there.  We then use that to locate
#      our stuff later when we need to modify it.  Not robust at all.
#
#############################################################################

#       PYTHONPATH           affects loading of built code
#       LD_LIBRARY_PATH      as for PYTHONPATH.** Not used  yet, thank heavens


#
# precompute a few directory names.
#

set workdir=${PWD}/${RTARCH}

set reldir=${RTDIST}/releases/${RTCURRENT}/${RTARCH}

#if ( -f rtConfig ) then
#   source rtConfig
#   set reldir=${RTDIST}/releases/${baserelname}/${RTARCH}
#else
#   set reldir=${RTDIST}/releases/${RTCURRENT}/${RTARCH}
#endif

if ( $?RTSITEOVERRIDE ) then
   set overridedir=${RTSITEOVERRIDE}/${RTCURRENT}/${RTARCH}
   set overridedirbin=$overridedir/bin
   set overridedirlib=$overridedir/lib
else
   set overridedir=""
   set overridedirbin=""
   set overridedirlib=""
endif


#
# path
#
if ( `echo $path | grep RTMARKER` != "" ) then
   #RTMARKER sandwhich there...change out the filling

   set path=( `echo $path | sed "s%RTMARKER.*RTMARKER%RTMARKER $workdir/bin $overridedirbin $reldir/bin RTMARKER%g"` )

else
   #No MARKER...our first time, then

   set path=(`echo RTMARKER $workdir/bin $overridedirbin $reldir/bin RTMARKER` $path)

endif

#
# PYTHONPATH
#
if ( ! $?PYTHONPATH ) then
 setenv PYTHONPATH ""
endif

if ( `echo $PYTHONPATH | grep RTMARKER` != "" ) then

   setenv PYTHONPATH `echo $PYTHONPATH | sed "s%RTMARKER.*RTMARKER%RTMARKER:${workdir}/lib:${overridedirlib}:${reldir}/lib:RTMARKER%g"`

else
   #No MARKER...our first time, then

   setenv PYTHONPATH `echo RTMARKER:${workdir}/lib:${overridedirlib}:${reldir}/lib:RTMARKER`:${PYTHONPATH}
endif

#
# cleanup
#

unset workdir
unset reldir
unset overridedir
unset overridedirbin
unset overridedirlib

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3