Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:13:24

0001 MAKEFLAGS += -Orecurse
0002 
0003 SPACK ?= spack
0004 SPACK_INSTALL_FLAGS += --no-check-signature --show-log-on-error
0005 
0006 export SPACK_COLOR = always
0007 
0008 SPACK_ENV ?= dev
0009 
0010 BUILDCACHE_S3_PROMPT :=
0011 BUILDCACHE_S3_FINAL :=
0012 BUILDCACHE_OCI_PROMPT :=
0013 BUILDCACHE_OCI_FINAL :=
0014 BUILDCACHE_OCI_BASE_IMAGE := ghcr.io/eic/debian:stable-slim
0015 
0016 .PHONY: all clean
0017 
0018 all: $(SPACK_ENV)/push
0019 
0020 ifeq (,$(filter clean,$(MAKECMDGOALS)))
0021 include $(SPACK_ENV)/spack.mk
0022 endif
0023 
0024 $(SPACK_ENV)/push: $(addprefix $(SPACK_ENV)/push/,$($(SPACK_ENV)/SPACK_PACKAGE_IDS))
0025         $(foreach buildcache, $(BUILDCACHE_S3_FINAL), $(SPACK) buildcache push --unsigned $(buildcache) ;)
0026         $(foreach buildcache, $(BUILDCACHE_S3_FINAL), $(SPACK) buildcache update-index $(buildcache) ;)
0027         $(foreach buildcache, $(BUILDCACHE_S3_PROMPT), $(SPACK) buildcache update-index $(buildcache) ;)
0028         $(foreach buildcache, $(BUILDCACHE_OCI_FINAL), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) | grep -v "Using cached archive" ;)
0029 
0030 $(SPACK_ENV)/push/%: $(SPACK_ENV)/install/%
0031         @mkdir -p $(dir $@)
0032         $(foreach buildcache, $(BUILDCACHE_S3_PROMPT), $(SPACK) buildcache push --unsigned --only=package $(buildcache) /$(HASH) ;) # push $(SPEC)
0033         $(foreach buildcache, $(BUILDCACHE_OCI_PROMPT), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) /$(HASH) | grep -v "Using cached archive" ;) # push $(SPEC)
0034         @touch $@
0035 
0036 $(SPACK_ENV)/spack.lock: $(SPACK_ENV)/spack.yaml Makefile
0037         $(SPACK) concretize --force --fresh
0038 
0039 $(SPACK_ENV)/spack.mk: $(SPACK_ENV)/spack.lock Makefile
0040         $(SPACK) env depfile --output $@ --make-target-prefix $(SPACK_ENV)
0041 
0042 clean:
0043         rm -rf $(SPACK_ENV)/spack.lock $(SPACK_ENV)/spack.mk