-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMakefile
43 lines (34 loc) · 1002 Bytes
/
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
MAKO := $(patsubst %.txt,%.mako,$(wildcard *.txt))
CWD = $(shell pwd)
ifdef appsweb
WEB = ${appsweb}
else
WEB = .
endif
AMHELP = ../mob/AnkiMobile/Resources/HTML/help.html
TOC_FILES = manual.mako am-manual.mako changes.mako addons.mako \
am-changes.mako manual.fr.mako manual.pl.mako manual.es.mako \
addons20.mako manual20.mako knownissues20.mako knownissues21.mako
all: build
@echo "remember to run 'make commit' to commit changes"
rsync -a img $(WEB)/docs/
commit: save build
save:
-git commit -a -m update && git push
git pull
git push
build: $(MAKO)
@echo building mako
@rsync -a *.mako *.png *.pdf *.html img redir.js $(WEB)/docs/
$(TOC_FILES): TOC := 1
%.mako: %.txt asciidoc.conf
@echo asciidoc $<
@asciidoc -s -b html5 -o $@ $<
@echo '<%inherit file="/base.inc"/>' > [email protected]
@cat style.inc >> [email protected]
@if [ x$(TOC) != x ]; then cat toc.pre >> [email protected]; fi
@cat $@ >> [email protected]
@if [ x$(TOC) != x ]; then cat toc.post >> [email protected]; fi
@mv [email protected] $@
clean:
touch *.txt