File: common

package info (click to toggle)
modules 5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,572 kB
  • sloc: exp: 46,525; sh: 5,261; tcl: 3,182; makefile: 1,355; ansic: 466; python: 251; csh: 201; perl: 47; ruby: 44
file content (63 lines) | stat: -rw-r--r-- 1,822 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Common stuff for "bar" modulefiles
# Using "modulerc based" strategy
#
# This file expects the following Tcl variables to have been
# previously set:
#	version: version of bar
#	compilerTag: compiler was built for
#	simdTag: max CPU vectorization commands to support
#		avx, avx2, sse4.1, etc.

# Declare the path where the packages are installed
# The reference to the environment variable is a hack
# for this example; normally one would hard code a path
set rootdir $::env(MOD_GIT_ROOTDIR)
set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root

# Also get location of and load common procedures
# This is a hack for the cookbook examples, in production
# one should either
# 1) declare the procedures in a site config file (preferred)
# 2) hardcode the path to $tcllibdir and common_utilities.tcl
set tcllibdir $rootdir/doc/example/compiler-etc-dependencies/tcllib
source $tcllibdir/common_utilities.tcl

proc ModulesHelp { } {
   global version compilerTag simdTag
   puts stderr "
bar: Test dummy version of bar $version

For testing packages depending on compilers/etc

Bar: $version
Compiler: $compilerTag
SIMD Support: $simdTag

"
}

module-whatis "Dummy bar $version ($compilerTag, $simdTag)"

# Make sure loaded compiler matches what we want.
LoadedCompilerMatches $compilerTag 1 1
# For Environment Modules 3.x, set requireIt to false
#LoadedCompilerMatches $compilerTag 0 1

# Compute the installation prefix
set pkgroot $swroot/bar
set vroot $pkgroot/$version
set prefix $vroot/$compilerTag/$simdTag

# Set environment variables
setenv BAR_DIR $prefix

set bindir $prefix/bin
set libdir $prefix/lib
set incdir $prefix/include

prepend-path PATH            $bindir
prepend-path LIBRARY_PATH    $libdir
prepend-path LD_LIBRARY_PATH $libdir
prepend-path CPATH           $incdir

conflict bar