diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-01-18 19:19:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 19:19:46 +0100 |
commit | f050b1cf7835fd31992b020e1061c52294ff7330 (patch) | |
tree | 150ca0a67be1b63d415146436e55b164f899f03d /CITATION.cff | |
parent | 6cf32110b912056201d5a901ee2e99979dc601bf (diff) | |
download | spack-f050b1cf7835fd31992b020e1061c52294ff7330.tar.gz spack-f050b1cf7835fd31992b020e1061c52294ff7330.tar.bz2 spack-f050b1cf7835fd31992b020e1061c52294ff7330.tar.xz spack-f050b1cf7835fd31992b020e1061c52294ff7330.zip |
depfile: variable with all identifiers (#34678)
With the new variable [prefix/]SPACK_PACKAGE_IDS you can conveniently execute
things after each successful install.
For example push just-built packages to a buildcache
```
SPACK ?= spack
export SPACK_COLOR = always
MAKEFLAGS += -Orecurse
MY_BUILDCACHE := $(CURDIR)/cache
.PHONY: all clean
all: push
ifeq (,$(filter clean,$(MAKECMDGOALS)))
include env.mk
endif
# the relevant part: push has *all* example/push/<pkg identifier> as prereqs
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))
$(SPACK) -e . buildcache update-index --directory $(MY_BUILDCACHE)
$(info Pushed everything, yay!)
# and each example/push/<pkg identifier> has the install target as prereq,
# and the body can use target local $(HASH) and $(SPEC) variables to do
# things, such as pushing to a build cache
example/push/%: example/install/%
@mkdir -p $(dir $@)
$(SPACK) -e . buildcache create --allow-root --only=package --unsigned --directory $(MY_BUILDCACHE) /$(HASH) # push $(SPEC)
@touch $@
spack.lock: spack.yaml
$(SPACK) -e . concretize -f
env.mk: spack.lock
$(SPACK) -e . env depfile -o $@ --make-target-prefix example
clean:
rm -rf spack.lock env.mk example/
``
Diffstat (limited to 'CITATION.cff')
0 files changed, 0 insertions, 0 deletions