Add depends-on modulefile command

Introduce the depends-on modulefile command which defines module
requirements for currently loading modulefile. This command is an alias
over prereq command with all modulefile arguments treated as a Boolean
AND operation: all specified modulefiles are required.
This commit is contained in:
Xavier Delaruelle
2021-12-02 06:10:02 +01:00
parent 5be8f99d58
commit ca8c43bdd4

View File

@@ -93,6 +93,7 @@ add-property {nop nop nop nop nop
append-path {append-path append-path-un append-path append-path append-path edit-path-wh nop }
chdir {chdir nop reportCmd nop nop nop nop }
conflict {conflict nop reportCmd nop nop nop nop }
depends-on {depends-on nop reportCmd nop nop nop nop }
extensions {nop nop nop nop nop nop nop }
module {module module reportCmd nop nop nop nop }
module-alias {module-alias module-alias module-alias module-alias module-alias module-alias nop }
@@ -2452,6 +2453,16 @@ proc require-fullname {} {
}
}
proc depends-on {args} {
if {[llength $args] == 0} {
knerror {wrong # args: should be "depends-on modulefile ?...?"}
}
# call prereq over each arg independently to emulate a prereq-all
foreach arg $args {
prereq $arg
}
}
# ;;; Local Variables: ***
# ;;; mode:tcl ***
# ;;; End: ***