summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash7
-rw-r--r--share/spack/templates/depfile/Makefile18
2 files changed, 13 insertions, 12 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 8b12116fe9..c6d407b4d5 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -1022,7 +1022,12 @@ _spack_env_revert() {
}
_spack_env_depfile() {
- SPACK_COMPREPLY="-h --help --make-target-prefix --make-disable-jobserver -o --output -G --generator"
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help --make-target-prefix --make-disable-jobserver --use-buildcache -o --output -G --generator"
+ else
+ _all_packages
+ fi
}
_spack_extensions() {
diff --git a/share/spack/templates/depfile/Makefile b/share/spack/templates/depfile/Makefile
index a149951d9f..5078f0016f 100644
--- a/share/spack/templates/depfile/Makefile
+++ b/share/spack/templates/depfile/Makefile
@@ -15,23 +15,19 @@ SPACK ?= spack
# This is an involved way of expressing that Spack should only install
# an individual concrete spec from the environment without deps.
{{ install_target }}/%: {{ install_deps_target }}/% | {{ dirs_target }}
- $(info Installing $(SPEC))
- {{ jobserver_support }}$(SPACK) -e '{{ environment }}' install $(SPACK_INSTALL_FLAGS) --only-concrete --only=package --no-add /$(notdir $@)
- @touch $@
-
-# Targets of the form {{ install_deps_target }}/<hash> install dependencies only
-{{ install_deps_target }}/%: | {{ dirs_target }}
+ {{ jobserver_support }}$(SPACK) -e '{{ environment }}' install $(SPACK_BUILDCACHE_FLAG) $(SPACK_INSTALL_FLAGS) --only-concrete --only=package --no-add /$(notdir $@) # $(SPEC)
@touch $@
# Set a human-readable SPEC variable for each target that has a hash
-{% for (hash, name) in hash_with_name -%}
-{{ any_hash_target }}/{{ hash }}: SPEC = {{ name }}
+{% for (parent, name, build_cache, _) in adjacency_list -%}
+{{ any_hash_target }}/{{ parent }}: SPEC = {{ name }}
+{{ any_hash_target }}/{{ parent }}: SPACK_BUILDCACHE_FLAG = {{ build_cache }}
{% endfor %}
# The Spack DAG expressed in targets:
-{% for (target, prereqs) in targets_to_prereqs -%}
-{{ target }}: {{prereqs}}
+{% for (parent, _, _, prereqs) in adjacency_list -%}
+{{ install_deps_target }}/{{ parent }}: {{prereqs}}
{% endfor %}
{{ clean_target }}:
- rm -rf {{ env_target }} {{ all_install_targets }} {{ all_install_deps_targets }}
+ rm -rf {{ env_target }} {{ cleanable_targets }}