Debian Codegraph @

doc/example/compiler-etc-dependencies/modulepath/Compiler/gcc/8.2.0/bar/common

raw
1 # Common stuff for "bar" modulefiles
2 # Using "modulepath based" strategy
3 #
4 # This file expects the following Tcl variables to have been
5 # previously set:
6 # version: version of foo
7 # compilerTag: compiler was built for
8 # simdTag: max CPU vectorization commands to support
9 # avx, avx2, sse4.1, etc.
10
11 # Declare the path where the packages are installed
12 # The reference to the environment variable is a hack
13 # for this example; normally one would hard code a path
14 set rootdir $::env(MOD_GIT_ROOTDIR)
15 set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root
16
17 proc ModulesHelp { } {
18 global version compilerTag simdTag
19 puts stderr "
20 foo: Test dummy version of foo $version
21
22 For testing packages depending on compilers/etc
23
24 Foo: $version
25 Compiler: $compilerTag
26 SIMD Support: $simdTag
27
28 "
29 }
30
31 module-whatis "Dummy foo $version ($compilerTag, $simdTag)"
32
33 # Compute the installation prefix
34 set pkgroot $swroot/bar
35 set vroot $pkgroot/$version
36 set prefix $vroot/$compilerTag/$simdTag
37
38 # We need to prereq the compiler to allow autohandling to work
39 prereq $compilerTag
40
41 # Set environment variables
42 setenv BAR_DIR $prefix
43
44 set bindir $prefix/bin
45 set libdir $prefix/lib
46 set incdir $prefix/include
47
48 prepend-path PATH $bindir
49 prepend-path LIBRARY_PATH $libdir
50 prepend-path LD_LIBRARY_PATH $libdir
51 prepend-path CPATH $incdir
52
53 conflict bar