summaryrefslogtreecommitdiffstats
path: root/quips.pro
blob: 33ec09909aa309bb78c47c37c0241f028adb7a86 (plain)
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
TEMPLATE = aux

QUIPS += $$files($$PWD/quip-*.rst)

PYTHON       = python
GENQUIP0_PY  = $$PWD/scripts/gen-quip-0000.py
QUIP2HTML_PY = $$PWD/scripts/quip2html.py
HTTP_PORT    = 8000

quip2html.input = QUIPS
quip2html.output = html/${QMAKE_FILE_BASE}.html
quip2html.commands = $$PYTHON $$QUIP2HTML_PY ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
quip2html.depends += $$QUIP2HTML_PY template.html
quip2html.CONFIG += target_predeps

quip_0000.target = html/quip-0000.html
quip_0000.commands = $$PYTHON $$GENQUIP0_PY $$QUIPS | $$PYTHON $$QUIP2HTML_PY - > $$quip_0000.target
quip_0000.depends += $$GENQUIP0_PY $$QUIP2HTML_PY $$QUIPS html/.ready

html_index.target = html/index.html
html_index.commands = ln -sf quip-0000.html html/index.html
html_index.depends = html/.ready

html_setup.target = html/.ready
html_setup.commands = make -f $$PWD/scripts/setup.mk SRC=$$PWD setup

template.depends = $$PWD/scripts/template.diff $$PWD/planetqt/template.qt
template.target = template.html
template.commands = patch -d $$PWD -l -p0 -i scripts/template.diff -o scripts/template.html && mv $$PWD/scripts/template.html ./

html_serve.target = serve
html_serve.commands = cd html && $$PYTHON -m SimpleHTTPServer $$HTTP_PORT

POST_TARGETDEPS += html/quip-0000.html html/index.html html/.ready
QMAKE_CLEAN += html/

QMAKE_EXTRA_TARGETS += html_setup template quip_0000 html_index html_serve
QMAKE_EXTRA_COMPILERS += quip2html