-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (49 loc) · 1.36 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
CWD = $(CURDIR)
MODULE = $(notdir $(CWD))
PY = $(CWD)/bin/python3
PIP = $(CWD)/bin/pip3
PI = $(CWD)/Picat/picat
server: $(PY) $(MODULE).py $(MODULE).ini
$^
.PHONY: install update requirements.txt wiki
install: doc $(PI) $(PIP)
git clone -o gh git@github.com:ponyatov/uPicat.wiki.git wiki
$(MAKE) update
$(PIP):
sudo apt install -u `cat apt.txt`
python3 -m venv $(CWD)
update: $(PIP)
git pull -v
$(PIP) install -U pip
$(PIP) install -U -r requirements.txt
$(MAKE) requirements.txt
$(MAKE) wiki
wiki:
cd wiki ; git pull -v
requirements.txt:
$(PIP) freeze | grep -v 0.0.0 > $@
PI_VER = 27b12
PI_GZ = picat$(PI_VER)_linux64.tar.gz
PI_SRC = picat$(PI_VER)_src.tar.gz
$(PI): /tmp/$(PI_GZ)
tar zx < $< && touch $@
/tmp/$(PI_GZ):
wget -c -O $@ http://picat-lang.org/download/$(PI_GZ)
doc: doc/book.pdf doc/manual.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
MERGE = Makefile README.md .gitignore
MERGE += $(MODULE).py $(MODULE).ini requirements.txt apt.txt
MERGE += doc
MERGE += static templates
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