Skip to content
Snippets Groups Projects
Commit 1f6cffb6 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

fix: makefile fixes

parent 9934ff84
No related branches found
No related tags found
No related merge requests found
MAKEFLAGS += -Orecurse
SPACK ?= spack SPACK ?= spack
SPACK_INSTALL_FLAGS += --no-check-signature SPACK_INSTALL_FLAGS += --no-check-signature
export SPACK_COLOR = always
SPACK_ENV ?= dev
BUILDCACHE := $(SPACK_ENV)/cache BUILDCACHE := $(SPACK_ENV)/cache
.PHONY: all clean .PHONY: all clean
all: push all: $(SPACK_ENV)/push
ifeq (,$(filter clean,$(MAKECMDGOALS))) ifeq (,$(filter clean,$(MAKECMDGOALS)))
include ${SPACK_ENV}/spack.mk include $(SPACK_ENV)/spack.mk
endif endif
${SPACK_ENV}/push: $(addprefix ${SPACK_ENV}/push/,$(SPACK_PACKAGE_IDS)) $(SPACK_ENV)/push: $(addprefix $(SPACK_ENV)/push/,$($(SPACK_ENV)/SPACK_PACKAGE_IDS))
$(SPACK) buildcache update-index --directory $(BUILDCACHE) @mkdir -p $(BUILDCACHE)
$(foreach buildcache, $(BUILDCACHE), $(SPACK) buildcache update-index $(buildcache) ;)
${SPACK_ENV}/push/%: ${SPACK_ENV}/install/% $(SPACK_ENV)/push/%: $(SPACK_ENV)/install/%
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(foreach buildcache, $(BUILDCACHE), $(SPACK) buildcache create --allow-root --only=package --unsigned $(buildcache) /$(HASH);) $(foreach buildcache, $(BUILDCACHE), $(SPACK) buildcache create --allow-root --only=package --unsigned $(buildcache) /$(HASH) ;) # push $(SPEC)
@touch $@ @touch $@
${SPACK_ENV}/spack.lock: ${SPACK_ENV}/spack.yaml $(SPACK_ENV)/spack.lock: $(SPACK_ENV)/spack.yaml Makefile
$(SPACK) concretize --force $(SPACK) concretize --force --fresh
${SPACK_ENV}/spack.mk: ${SPACK_ENV}/spack.lock $(SPACK_ENV)/spack.mk: $(SPACK_ENV)/spack.lock Makefile
$(SPACK) env depfile --output $@ --make-target-prefix "" $(SPACK) env depfile --output $@ --make-prefix $(SPACK_ENV)
clean: clean:
rm -rf ${SPACK_ENV}/spack.lock ${SPACK_ENV}/spack.mk rm -rf $(SPACK_ENV)/spack.lock $(SPACK_ENV)/spack.mk
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment