-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (22 loc) · 918 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PATH := $(CURDIR)/eth-cscs-spack/bin:$(PATH)
# Disable ~/.spack and /etc/spack config, just to be sure.
# and make sure the current directory is used for any spack
# caches, if that's somehow triggered.
SPACK_DISABLE_LOCAL_CONFIG:=1
SPACK_USER_CACHE_DIR:=$(CURDIR)/.spack
CONFIG_FLAGS:=
.PHONY: check-spack install clean
all: generated-configs
spack.tar.gz:
curl -Lfso $@ https://github.com/spack/spack/archive/refs/heads/develop.tar.gz
eth-cscs-spack: spack.tar.gz
mkdir $@ && tar -xf $< --strip-components=1 -C $@
check-spack: eth-cscs-spack
@echo using $$(which spack) at $$(spack --version)
generated-configs: eth-cscs-spack | check-spack
./spack-allinone.py $(CONFIG_FLAGS)
install: generated-configs
install -Dm 644 spack-config "$(DESTDIR)/modules/spack-config/1.0.0"
cd $< && find . -type f -exec install -Dm 644 '{}' "$(DESTDIR)/{}" \;
clean:
rm -rf .spack generated-configs eth-cscs-spack*