-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 1.64 KB
/
Makefile
File metadata and controls
38 lines (30 loc) · 1.64 KB
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
32
33
34
35
36
37
# Makefile
VENV := .venv
PYTHON := $(VENV)/bin/python3
PIP := $(VENV)/bin/pip
.PHONY: setup run clean
# Idempotent setup: only updates if requirements.txt changed or venv is missing
$(VENV)/bin/activate: requirements.txt
@test -d $(VENV) || python3 -m venv $(VENV)
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt
@touch $(VENV)/bin/activate
setup: $(VENV)/bin/activate
config_merged.yaml: setup merge_blame.py config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml
$(PYTHON) merge_blame.py config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml > config_merged.yaml
config_merged_dev.yaml: setup merge_blame.py config_general.yaml config_devel.yaml config_rcm_old.yaml config_rcm_fixed.yaml
$(PYTHON) merge_blame.py config_general.yaml config_devel.yaml config_rcm_old.yaml config_rcm_fixed.yaml > config_merged_dev.yaml
show_blame: setup merge_blame.py config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml
$(PYTHON) merge_blame.py --blame config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml
show_blame_always: setup merge_blame.py config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml
$(PYTHON) merge_blame.py --blame --blame-color auto config_general.yaml config_rcm_old.yaml config_rcm_fixed.yaml
# Example run command using the config file
run: setup config_merged.yaml
$(PYTHON) sprm.py --config config_merged.yaml clone
run_dev: setup config_merged_dev.yaml
$(PYTHON) sprm.py --config config_merged_dev.yaml --debug clone
run_cluster: setup config_merged.yaml
$(PYTHON) sprm.py --config config_merged.yaml --path $TMPDIR/$USER/spack_rcm_packages
clean:
rm -rf $(VENV)
rm -f git_sync_*.log