This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
66 lines (43 loc) · 1.49 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
export REPO_ROOT:=$(shell git rev-parse --show-toplevel)
export CONDA:=$(REPO_ROOT)/tools/bootstrap/miniconda/bin/conda
export TOOL:=$(REPO_ROOT)/tools/binary-pkg/bin
$(CONDA):
./tools/bootstrap/bootstrap.sh
$(TOOL): $(CONDA)
$(CONDA) env create -p tools/binary-pkg -f tools/binary-pkg.yaml
install-tools: $(TOOL)
install-clean:
rm -rf tools/binary-pkg
rm -rf tools/bootstrap/miniconda
.PHONY: install-tools install-clean
checkout-%: %.yaml $(TOOL)
$(TOOL)/python -m binary_pkg.cmdline --config $< --checkout
build-%: %.yaml $(TOOL)
$(TOOL)/python -m binary_pkg.cmdline --config $< --build
stage-%: %.yaml $(TOOL)
$(TOOL)/python -m binary_pkg.cmdline --config $< --stage --package "$(PACKAGE)"
dist-%: %.yaml $(TOOL)
$(TOOL)/python -m binary_pkg.cmdline --config $< --dist --package "$(PACKAGE)"
package-%: %.yaml
$(MAKE) checkout-$*
$(MAKE) build-$*
$(MAKE) stage-$*
$(MAKE) dist-$*
shell: $(TOOL)
$(TOOL)/ipython
test: $(TOOL)
$(TOOL)/python -m unittest discover
info: $(TOOL)
$(TOOL)/python -m binary_pkg.os_information
$(TOOL)/python -m binary_pkg.cmdline --config sage.yaml --info
transient: clean
rm -rf /tmp/binary-pkg
for d in source build staging dist ; do \
mkdir -p /tmp/binary-pkg/$$d && ln -s /tmp/binary-pkg/$$d $$d ; \
done
@echo "--- Moved build directories to /tmp for development; Run make clean to switch back ---"
clean:
rm -rf staging source build tmp dist
distclean: clean install-clean
.PHONY: shell test info transient clean distclean
include *.mk