@@ -4,41 +4,6 @@ ATFL_VERSION="%ATFL_VERSION%"
44ATFL_BUILD=" %ATFL_BUILD%"
55ATFL_INSTALL_PREFIX=" %ATFL_INSTALL_PREFIX%"
66
7- mkdir -p " moduledeps/atfl/${ATFL_VERSION} /clang-autocomplete"
8- (
9- cat << EOT
10- ----------------------------------------------------------------
11- --
12- -- clang-autocomplete
13- --
14- --
15- -- Copyright 2015-2025 Arm Limited. All rights reserved.
16- --
17-
18- ---------------------------------------------------------------------------
19- -- Variable definitions --
20- ---------------------------------------------------------------------------
21-
22- -- Base install directory of ATfL
23- local install_prefix = "${ATFL_INSTALL_PREFIX} "
24-
25- ---------------------------------------------------------------------------
26- -- Main section --
27- ---------------------------------------------------------------------------
28-
29- -- Install directory of this package
30- local package_prefix = pathJoin(install_prefix, "")
31-
32- local autocomplete_file = pathJoin(package_prefix, "/share/clang/bash-autocomplete.sh")
33-
34- execute{cmd="source " .. autocomplete_file, modeA={"load"}}
35-
36- -- Lmod can't figure out how to unsource files without help, so we undo it here
37- execute{cmd="complete -r armclang armflang armclang++", modeA={"unload"}}
38- execute{cmd="unset -f _clang", modeA={"unload"}}
39- EOT
40- ) > " moduledeps/atfl/${ATFL_VERSION} /clang-autocomplete/${ATFL_VERSION} .lua"
41-
427mkdir -p " modulefiles/atfl"
438(
449cat << EOT
@@ -106,18 +71,16 @@ set package_prefix \$install_prefix
10671 append-path LIBRARY_PATH \$ package_prefix/lib/aarch64-unknown-linux-gnu
10772 prepend-path MANPATH \$ package_prefix/share/man
10873
109- if { [is-lmod] } {
110- # Lmod family
111- # When this modulefile is used with lmod, This ensures only one compiler is loaded at once
112- family "compiler"
113- }
114-
11574# Source the bash-autocomplete.sh
11675set SHELL [module-info shell]
11776switch -- \$ SHELL {
11877 {sh} - {bash} {
11978 if { [is-lmod] } {
120- module load clang-autocomplete/${ATFL_VERSION}
79+ local autocomplete_file = pathJoin(package_prefix, "/share/clang/bash-autocomplete.sh")
80+ execute{cmd="source " .. autocomplete_file, modeA={"load"}}
81+ ## Lmod can't figure out how to unsource files without help, so we undo it here
82+ execute{cmd="complete -r armclang armflang armclang++", modeA={"unload"}}
83+ execute{cmd="unset -f _clang", modeA={"unload"}}
12184 } else {
12285 set autocomplete_file \$ package_prefix/share/clang/bash-autocomplete.sh
12386 if { [file exists \$ autocomplete_file] } {
0 commit comments