Following a typical linux layout, e.g.
./configure \
--prefix=/
--etcdir=/etc \
--initdir=/etc/modules/init \
--modulefilesdir=/etc/modules/modulefiles
--bindir=/usr/bin \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--datarootdir=/usr/share \
--mandir=/usr/share/man \
--docdir=/usr/share/doc \
--vimdatadir=/usr/share/vim/vimfiles \
will lead to a wrong and empty MODULESHOMES (which seems not to be used by the tool itself, but is mainly used as $MODULESHOMES/init/<init-skript> by external scripts).
Furthermore compiling with custom CFLAGS does not work due to space typo.
Suggested patches:
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 843e178..8e77ec7 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -4,7 +4,7 @@
CFLAGS_WARNING=@CFLAGS_WARNING@
CC=@TCL_CC@
-CFLAGS=@CFLAGS@@TCL_INCLUDE_SPEC@
+CFLAGS=@CFLAGS@ @TCL_INCLUDE_SPEC@
# apply specific flags if code coverage asked
ifeq ($(COVERAGE),y)
CFLAGS += -coverage -O0
diff --git a/modulecmd.tcl.in b/modulecmd.tcl.in
index 843e178..8e77ec7 100644
--- a/modulecmd.tcl.in
+++ b/modulecmd.tcl.in
@@ -9066,7 +9066,7 @@ proc cmdModuleAutoinit {} {
pushMode load
# default MODULESHOME
- setenv MODULESHOME @prefix@
+ setenv MODULESHOME [file dirname @initdir@]
# register command location
setenv MODULES_CMD [getAbsolutePath $::argv0]
Following a typical linux layout, e.g.
will lead to a wrong and empty
MODULESHOMES(which seems not to be used by the tool itself, but is mainly used as$MODULESHOMES/init/<init-skript>by external scripts).Furthermore compiling with custom
CFLAGSdoes not work due to space typo.Suggested patches: