-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (42 loc) · 1.11 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
all: wayland weston
PYTHON = python
XMLS = $(wildcard ../wayland/protocol/*.xml) $(wildcard ../weston/protocol/*.xml)
TEMPLATES = $(wildcard doc/templates/*)
GENERATED_FILES = \
doc/wayland/index.html \
doc/weston/index.html
wayland: doc/wayland/index.html
weston: doc/weston/index.html
# symlinked because it's easier as that's what the tp-spec script expects
xml/wayland:
mkdir -p xml
ln -s $$(pwd)/../wayland/protocol xml/wayland
xml/weston:
mkdir -p xml
ln -s $$(pwd)/../weston/protocol xml/weston
$(GENERATED_FILES): $(XMLS) xml/wayland xml/weston tools/doc-generator.py tools/protocolparser.py $(TEMPLATES)
@dir=`dirname $@`; \
project=`basename $$dir`; \
rm -rf $$dir; \
install -d $$dir; \
$(PYTHON) tools/doc-generator.py xml/$$project $$dir $$project
upload: all
scp -r doc/weston doc/wayland dhansak:public_html/
all: $(GENERATED_FILES)
@echo "Your protocol HTML starts at:"
@echo
@for i in $(GENERATED_FILES); do \
echo file://$(CURDIR)/$$i; \
done
@echo
clean:
rm -rf xml
rm -rf doc/wayland
rm -rf doc/weston
rm -rf tmp
.PHONY: \
all \
clean \
wayland \
weston \
upload