-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (52 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
66
67
68
CWD = $(CURDIR)
MODULE = $(notdir $(CWD))
GZ ?= $(HOME)/gz
SRC ?= $(CWD)/src
PI = $(CWD)/Picat/picat
PY = $(CWD)/bin/python3
PIP = $(CWD)/bin/pip3
go: $(PI) pi.pi
$^
install: $(PI) $(PY) doc
doc: doc/wambook.pdf doc/book.pdf doc/manual.pdf
doc/wambook.pdf:
wget -c -O $@ http://wambook.sourceforge.net/wambook.pdf
doc/book.pdf:
wget -c -O $@ http://picat-lang.org/picatbook2015/constraint_solving_and_planning_with_picat.pdf
doc/manual.pdf:
wget -c -O $@ http://picat-lang.org/download/picat_guide.pdf
PI_VER = 27b12
PI_GZ = picat$(PI_VER)_linux64.tar.gz
PI_SRC = picat$(PI_VER)_src.tar.gz
$(PI): $(GZ)/$(PI_GZ)
tar zx < $< && touch $@
$(GZ)/$(PI_GZ):
wget -c -O $@ http://picat-lang.org/download/$(PI_GZ)
src: $(SRC)/README
$(SRC)/README: $(GZ)/$(PI_SRC)
rm -rf $(SRC) ; mkdir $(SRC) ; cd $(SRC) ; tar zx < $< ; mv Picat/* ./ ; touch README
$(GZ)/$(PI_SRC):
wget -c -O $@ http://picat-lang.org/download/picat27b12_src.tar.gz
$(PY):
python3 -m venv
$(PIP) install -U pip
$(MAKE) update
update: requirements.txt
git pull -v
$(PIP) install -U -r $<
$(MAKE) $<
.PHONY: requirements.txt
requirements.txt:
$(PIP) freeze | egrep -v "(terminado|0.0.0)" > $@
MERGE = Makefile README.md .gitignore
MERGE += pycat.ipynb requirements.txt apt.txt postBuild
MERGE += src
merge:
git checkout master
git checkout shadow -- $(MERGE)
NOW = $(shell date +%d%m%y)
REL = $(shell git rev-parse --short=4 HEAD)
release:
git tag $(NOW)-$(REL)
git push -v && git push -v --tags
git checkout shadow