-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
85 lines (68 loc) · 2.33 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Deploy locally
.PHONY: local
local: doxygen manual messages build
@echo "Result is in _site"
# Deploy to Sapling
.PHONY: deploy
deploy: local
sudo rsync --recursive /scratch/www/htdocs/ \
/scratch/www/htdocs.backup-$(shell date '+%Y-%m-%d')/
sudo rsync --recursive --delete \
--exclude /cg \
--exclude /circuit \
--exclude /fluid \
--exclude /profiler \
--exclude /profiler-data \
--exclude /profiling.html \
--exclude /rect \
--exclude /s3d \
--exclude /software_lunch \
--exclude /s3dtraces \
_site/ /scratch/www/htdocs/
# rm -rf doxygen _site
# Deploy to GitHub
.PHONY: github
github: local
@if [ -d _github ]; then git -C _github pull --ff-only; else git clone -b master [email protected]:StanfordLegion/StanfordLegion.github.io.git _github; fi
@if ! git -C _github diff-index --quiet --cached HEAD --; then echo "The _github directory has staged (uncommitted) files, please resolve"; exit 1; fi
@if ! git -C _github diff-files --quiet; then echo "The _github directory has dirty files, please resolve"; exit 1; fi
@if git -C _github ls-files --others --error-unmatch . 1> /dev/null 2> /dev/null; then echo "The _github directory has untracked files, please resolve"; exit 1; fi
rsync --recursive --delete \
--exclude .git \
--exclude .nojekyll \
--exclude CNAME \
_site/ _github/
git -C _github add -A .
git -C _github commit --message "Deploy $(shell date)."
git -C _github push
# Build steps:
.PHONY: doxygen
doxygen: legion
doxygen
.PHONY: messages
messages: legion
rm -rf messages
cd ./_legion/doc && LG_RT_DIR=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))_legion/runtime bash ./makeAllTheThings.bash
mv ./_legion/doc/publish/messages .
.PHONY: legion
legion:
@if [ -d _legion ]; then git -C _legion pull --ff-only; else git clone -b stable https://github.com/StanfordLegion/legion.git _legion; fi
.PHONY: manual
manual:
@if [ -d _manual ]; then git -C _manual pull --ff-only; else git clone -b master https://github.com/StanfordLegion/legion-manual.git _manual; fi
cd _manual && TEST_LATEX=1 ./ci.sh
cp _manual/legion.pdf pdfs/legion-manual.pdf
.PHONY: build
build:
bundle install
bundle exec jekyll build
.PHONY: serve
serve: doxygen manual messages
bundle install
bundle exec jekyll serve --watch
.PHONY: spelling
spelling:
for f in *.md; do aspell -c $$f;done
.PHONY: clean
clean:
rm -rf _site messages *.bak