Debian Codegraph @

doc/example/compiler-etc-dependencies/flavours/foo/common

raw
1 # Common stuff for "foo" modulefiles
2 # Using "flavours" strategy
3 #
4 # Expects the following Tcl variables to have been previously set:
5 # version: version of foo
6
7 # Initialise "flavours"
8 package require flavours
9 flavours init
10
11 proc ModulesHelp { } {
12 global version
13 puts stderr "
14 foo: Test dummy version of foo $version
15
16 For testing packages depending on compilers/MPI
17
18 "
19 }
20
21 module-whatis "Dummy foo $version"
22
23 # Construct flavour name
24 flavours prereq -class compiler
25 flavours prereq -optional -class mpi
26 flavours conflict foo
27
28 # Declare the path where the packages are installed
29 # The reference to the environment variable is a hack
30 # for this example; normally one would hard code a path
31 set rootdir $::env(MOD_GIT_ROOTDIR)
32 set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root
33
34 flavours root $swroot/foo/$version
35 flavours revision 1
36 flavours commit
37
38 # Set environment variables
39 setenv FOO_DIR [flavours path]
40
41 # Prepend to environment variables (paths relative to
42 # the directory containing the flavour)
43 flavours prepend-path PATH bin
44 flavours prepend-path LIBRARY_PATH lib
45 flavours prepend-path LD_LIBRARY_PATH lib
46 flavours prepend-path CPATH include
47
48 # Reload any modules with this as a prerequisite
49 flavours cleanup