Skip to content

Commit

Permalink
Set the environment variable Upcgen_ROOT automatically when loading t…
Browse files Browse the repository at this point in the history
…he module Upcgen
  • Loading branch information
pbuehler committed Dec 13, 2024
1 parent e8aef8c commit 8b50343
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions upcgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --bin --lib > "$MODULEFILE"
cat >> "$MODULEFILE" <<EOF
# extra environment
# we define this so that the starlight installation can be found/queried
setenv ${PKGNAME}_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
# we purposely are not adding to ROOT_INCLUDE_PATH
# to avoid making that search path to long. Users can do
# this themsevles in the ROOT macro (just-in-time) via ${PKGNAME}_ROOT.
# prepend-path ROOT_INCLUDE_PATH \$${PKGNAME}_ROOT/include/
EOF

0 comments on commit 8b50343

Please sign in to comment.