Skip to content

Commit

Permalink
Issue #679: update configure options to use DOWNSTREAM instead of PER…
Browse files Browse the repository at this point in the history
…MANENT
  • Loading branch information
Robert McLay committed Mar 29, 2024
1 parent 0aadd8d commit e415466
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AUTO_SWAP := @AUTO_SWAP@
SPIDER_CACHE_DIRS := @SPIDER_CACHE_DIRS@
LEGACY_ORDERING := @LEGACY_ORDERING@
EXPORT_MODULE := @EXPORT_MODULE@
LMOD_PERMANENT_CONFLICTS := @LMOD_PERMANENT_CONFLICTS@
LMOD_DOWNSTREAM_CONFLICTS := @LMOD_DOWNSTREAM_CONFLICTS@
BASENAME := @BASENAME@
UPDATE_VERSION := LUA_PATH="$(srcdir)/tools/?.lua;$(SYS_LUA_PATH)" $(PATH_TO_LUA) $(srcdir)/proj_mgmt/updateVersion
BUILD_V_src := LUA_PATH="$(srcdir)/tools/?.lua;$(SYS_LUA_PATH)" LUA_CPATH="$(SYS_LUA_CPATH)" $(PATH_TO_LUA) $(srcdir)/proj_mgmt/buildVersion_src
Expand Down Expand Up @@ -289,7 +289,7 @@ __installMe:
-e 's|@fast_tcl_interp@|$(FAST_TCL_INTERP)|g' \
-e 's|@settarg_cmd@|$(SETTARG_CMD)|g' \
-e 's|@lmod_config_dir@|$(LMOD_CONFIG_DIR)|g' \
-e 's|@lmod_downstream_conflicts@|$(LMOD_PERMANENT_CONFLICTS)|g' \
-e 's|@lmod_downstream_conflicts@|$(LMOD_DOWNSTREAM_CONFLICTS)|g' \
-e "s|@my_shell@|$$fn|g" \
-e 's|@tclsh@|$(PATH_TO_TCLSH)|g' \
-e 's|@ls@|$(PATH_TO_LS)|g' \
Expand Down
2 changes: 1 addition & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ echo "LMOD_CONFIG_DIR............................................." : $LMOD_CONF
echo "Use ~/.config/lmod directory only..........................." : $USE_DOT_CONFIG_DIR_ONLY
echo "Display Extensions w/ module avail.........................." : $AVAIL_EXTENSIONS
echo "Dynamic Spider Cache support................................" : $DYNAMIC_SPIDER_CACHE
echo "Module Conflicts remembered................................." : $LMOD_PERMANENT_CONFLICTS
echo "Module Conflicts remembered................................." : $LMOD_DOWNSTREAM_CONFLICTS
echo "Allow for extended default.(ml intel/17 #-> intel/17.0.4)..." : $EXTENDED_DEFAULT #"
Expand Down
27 changes: 27 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ CACHED_LOADS
LUA_INCLUDE
TMOD_FIND_FIRST
TMOD_PATH_RULE
LMOD_DOWNSTREAM_CONFLICTS
PIN_VERSIONS
IGNORE_DIRS
SETTARG
Expand Down Expand Up @@ -798,6 +799,7 @@ with_mpathSearch
with_settarg
with_ignoreDirs
with_pinVersions
with_downstreamConflicts
with_tmodPathRule
with_tmodFindFirst
with_lua_include
Expand Down Expand Up @@ -1490,6 +1492,9 @@ Optional Packages:
--with-ignoreDirs=ans list of directories to ignore [[.svn,.git,.hg,.bzr]]
--with-pinVersions=ans Save/Restore will use the current version instead of
changing with the default.[[no]]
--with-downstreamConflicts=ans
module conflicts are remembered for later loads.
[[no]]
--with-tmodPathRule=ans If path entry is already there then do not
append/prepend.[[no]]
--with-tmodFindFirst=ans
Expand Down Expand Up @@ -4033,6 +4038,27 @@ fi
# Check whether --with-downstreamConflicts was given.
if test ${with_downstreamConflicts+y}
then :
withval=$with_downstreamConflicts; LMOD_DOWNSTREAM_CONFLICTS="$withval"
LMOD_DOWNSTREAM_CONFLICTS=`echo $LMOD_DOWNSTREAM_CONFLICTS | tr '[:upper:]' '[:lower:]'`
VALID_YN $LMOD_DOWNSTREAM_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts" >&5
printf "%s\n" "LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts" >&6; }
printf "%s\n" "#define LMOD_DOWNSTREAM_CONFLICTS \"$with_downstreamConflicts\"" >>confdefs.h
else $as_nop
withval="no"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: LMOD_DOWNSTREAM_CONFLICTS=$withval" >&5
printf "%s\n" "LMOD_DOWNSTREAM_CONFLICTS=$withval" >&6; }
LMOD_DOWNSTREAM_CONFLICTS="$withval"
printf "%s\n" "#define LMOD_DOWNSTREAM_CONFLICTS \"$withval\"" >>confdefs.h
fi
# Check whether --with-tmodPathRule was given.
if test ${with_tmodPathRule+y}
then :
Expand Down Expand Up @@ -6867,6 +6893,7 @@ echo "LMOD_CONFIG_DIR............................................." : $LMOD_CONF
echo "Use ~/.config/lmod directory only..........................." : $USE_DOT_CONFIG_DIR_ONLY
echo "Display Extensions w/ module avail.........................." : $AVAIL_EXTENSIONS
echo "Dynamic Spider Cache support................................" : $DYNAMIC_SPIDER_CACHE
echo "Module Conflicts remembered................................." : $LMOD_DOWNSTREAM_CONFLICTS
echo "Allow for extended default.(ml intel/17 #-> intel/17.0.4)..." : $EXTENDED_DEFAULT #"
Expand Down
18 changes: 9 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -426,19 +426,19 @@ AC_ARG_WITH(pinVersions,
PIN_VERSIONS="$withval"
AC_DEFINE_UNQUOTED(PIN_VERSIONS, "$withval"))dnl

AC_SUBST(LMOD_PERMANENT_CONFLICTS)
AC_SUBST(LMOD_DOWNSTREAM_CONFLICTS)
AC_ARG_WITH(downstreamConflicts,
AS_HELP_STRING([--with-downstreamConflicts=ans],[module conflicts are remembered for later loads. [[no]]]),
LMOD_PERMANENT_CONFLICTS="$withval"
LMOD_PERMANENT_CONFLICTS=`echo $LMOD_PERMANENT_CONFLICTS | tr '@<:@:upper:@:>@' '@<:@:lower:@:>@'`
VALID_YN $LMOD_PERMANENT_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no"
AC_MSG_RESULT([LMOD_PERMANENT_CONFLICTS=$with_downstreamConflicts])
AC_DEFINE_UNQUOTED(LMOD_PERMANENT_CONFLICTS, "$with_downstreamConflicts")dnl
LMOD_DOWNSTREAM_CONFLICTS="$withval"
LMOD_DOWNSTREAM_CONFLICTS=`echo $LMOD_DOWNSTREAM_CONFLICTS | tr '@<:@:upper:@:>@' '@<:@:lower:@:>@'`
VALID_YN $LMOD_DOWNSTREAM_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no"
AC_MSG_RESULT([LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts])
AC_DEFINE_UNQUOTED(LMOD_DOWNSTREAM_CONFLICTS, "$with_downstreamConflicts")dnl
,
withval="no"
AC_MSG_RESULT([LMOD_PERMANENT_CONFLICTS=$withval])
LMOD_PERMANENT_CONFLICTS="$withval"
AC_DEFINE_UNQUOTED(LMOD_PERMANENT_CONFLICTS, "$withval"))dnl
AC_MSG_RESULT([LMOD_DOWNSTREAM_CONFLICTS=$withval])
LMOD_DOWNSTREAM_CONFLICTS="$withval"
AC_DEFINE_UNQUOTED(LMOD_DOWNSTREAM_CONFLICTS, "$withval"))dnl

AC_SUBST(TMOD_PATH_RULE)
AC_ARG_WITH(tmodPathRule,
Expand Down

0 comments on commit e415466

Please sign in to comment.