...
Codeblock |
---|
#%Module######## ## # Load dependencies set reqs "hpc_basis" source /software/modules/common/common.tcl set softwareName "Test-Software" set softwareVersion "1.0" # installation base folder of software set softwareInstallFolder "/software/$softwareName/$softwareVersion/${::env(ARCH)}" set msg "Sets environment variables for $softwareName $softwareVersion" # Can be modified set bin_dir "$softwareInstallFolder/bin" set includes "$softwareInstallFolder/include" set libs "$softwareInstallFolder/lib" # Should not be changed proc ModulesHelp { } { global hpc_basis_version puts stderr "\t$msg" } module-whatis "$msg" if { ! [ file isdirectory $softwareInstallFolder ] } { puts stderr "\n!!!ERROR!!!\n" puts stderr "$softwareName not available for architecture ${::env(ARCH)}!" puts stderr "$softwareInstallFolder does not exist" exit } if {[string compare $bin_dir ""] != 0} { prepend-path PATH $bin_dir } if {[string compare $libs ""] != 0} { prepend-path LIBRARY_PATH $libs prepend-path LD_LIBRARY_PATH $libs } if {[string compare $includes ""] != 0} { prepend-path INCLUDE $includes prepend-path C_INCLUDE_PATH $includes prepend-path CPLUS_INCLUDE_PATH $includes prepend-path INCLUDE_PATH $includes prepend-path LD_INCLUDE_PATH $includes } # Additional Paths # prepend-path PATH $softwareInstallFolder/scripts if { [ module-info mode load ] && ! [ catch {exec tty -s} ] } { puts stderr "\n $softwareName ($softwareVersion)" puts stderr " |--------------------------------------------------------------~o" if {[string compare $libs$bin_dir ""] != 0} { puts stderr " binaries : $bin_dir" } if {[string compare $libs ""] != 0} { puts stderr " libs : $libs" } if {[string compare $includes ""] != 0} { puts stderr " includes : $includes" } } |
...