2008-10-17 19:31:20 +02:00
|
|
|
# this makefile assumes that you have docutils and rst2pdf installed
|
2017-01-27 02:58:45 +01:00
|
|
|
# (python-docutils) as well as aafigure (python-aafigure)
|
2008-10-17 19:31:20 +02:00
|
|
|
|
2015-10-07 06:48:43 +02:00
|
|
|
ifneq ($(STAGE),)
|
2008-10-17 05:23:30 +02:00
|
|
|
WEB_PATH = ~/Documents/rasterbar/web/products/libtorrent
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef RST2HTML
|
2017-01-27 02:58:45 +01:00
|
|
|
RST2HTML:=rst2html
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
2008-10-17 05:23:30 +02:00
|
|
|
|
2017-06-14 09:53:09 +02:00
|
|
|
ifndef AAFIGURE
|
|
|
|
AAFIGURE=aafigure
|
|
|
|
endif
|
|
|
|
|
2013-08-05 07:26:15 +02:00
|
|
|
REFERENCE_TARGETS = \
|
2017-01-27 02:58:45 +01:00
|
|
|
manual-ref \
|
2013-08-05 07:26:15 +02:00
|
|
|
reference \
|
|
|
|
reference-Core \
|
|
|
|
reference-Plugins \
|
|
|
|
reference-Create_Torrents \
|
|
|
|
reference-Error_Codes \
|
|
|
|
reference-Storage \
|
|
|
|
reference-Custom_Storage \
|
|
|
|
reference-Utility \
|
|
|
|
reference-Bencoding \
|
|
|
|
reference-Alerts \
|
2013-08-06 04:50:57 +02:00
|
|
|
reference-Filter \
|
2013-08-11 18:57:33 +02:00
|
|
|
reference-Settings \
|
2015-03-13 06:42:18 +01:00
|
|
|
reference-Bdecoding \
|
2017-01-27 02:58:45 +01:00
|
|
|
reference-ed25519
|
2013-08-05 07:26:15 +02:00
|
|
|
|
2008-10-17 19:31:20 +02:00
|
|
|
TARGETS = index \
|
|
|
|
udp_tracker_protocol \
|
2011-01-02 04:53:28 +01:00
|
|
|
dht_rss \
|
2011-05-25 04:26:07 +02:00
|
|
|
dht_store \
|
2008-10-17 19:31:20 +02:00
|
|
|
client_test \
|
|
|
|
building \
|
|
|
|
features \
|
2014-02-02 10:57:24 +01:00
|
|
|
troubleshooting \
|
2010-02-18 21:01:23 +01:00
|
|
|
contributing\
|
2008-10-17 19:31:20 +02:00
|
|
|
examples \
|
|
|
|
extension_protocol \
|
|
|
|
dht_extensions \
|
2010-12-11 10:38:07 +01:00
|
|
|
dht_sec \
|
2008-10-17 19:31:20 +02:00
|
|
|
python_binding \
|
2009-02-09 04:48:27 +01:00
|
|
|
projects \
|
2010-11-29 02:33:05 +01:00
|
|
|
utp \
|
2011-12-11 10:44:05 +01:00
|
|
|
tuning \
|
2013-07-24 07:04:46 +02:00
|
|
|
hacking \
|
2014-06-07 18:43:14 +02:00
|
|
|
streaming \
|
2016-02-20 23:28:41 +01:00
|
|
|
tutorial \
|
2017-01-27 02:58:45 +01:00
|
|
|
single-page-ref \
|
2013-08-05 07:26:15 +02:00
|
|
|
$(REFERENCE_TARGETS)
|
2008-10-17 19:31:20 +02:00
|
|
|
|
2014-09-01 09:16:31 +02:00
|
|
|
FIGURES = \
|
|
|
|
read_disk_buffers \
|
|
|
|
write_disk_buffers \
|
|
|
|
hacking \
|
|
|
|
utp_stack \
|
2015-10-11 23:09:30 +02:00
|
|
|
storage \
|
|
|
|
disk_cache \
|
|
|
|
troubleshooting
|
2008-10-17 19:31:20 +02:00
|
|
|
|
2015-10-11 23:09:30 +02:00
|
|
|
html: $(TARGETS:=.html) $(FIGURES:=.png) todo.html
|
2009-02-09 04:48:27 +01:00
|
|
|
|
2015-12-28 04:37:44 +01:00
|
|
|
rst: $(TARGETS:=.rst) todo.html
|
|
|
|
|
2009-02-09 04:48:27 +01:00
|
|
|
pdf: $(TARGETS:=.pdf) $(FIGURES:=.eps)
|
2008-10-17 19:31:20 +02:00
|
|
|
|
2012-12-31 07:51:04 +01:00
|
|
|
epub: $(TARGETS:=.epub) $(FIGURES:=.png)
|
|
|
|
|
2015-12-28 04:37:44 +01:00
|
|
|
all: html pdf
|
2008-10-17 19:31:20 +02:00
|
|
|
|
2017-01-27 02:58:45 +01:00
|
|
|
single-page-ref.rst: $(REFERENCE_TARGETS:=.rst)
|
|
|
|
python join_rst.py $(filter-out reference.rst, $(REFERENCE_TARGETS:=.rst)) >single-page-ref.rst
|
|
|
|
|
2014-07-06 21:18:00 +02:00
|
|
|
settings.rst: ../include/libtorrent/settings_pack.hpp
|
|
|
|
python gen_settings_doc.py
|
|
|
|
|
2014-07-30 04:00:14 +02:00
|
|
|
stats_counters.rst: ../src/session_stats.cpp ../include/libtorrent/performance_counters.hpp
|
2014-07-09 01:44:34 +02:00
|
|
|
python gen_stats_doc.py
|
2014-07-06 21:18:00 +02:00
|
|
|
|
2014-07-09 01:44:34 +02:00
|
|
|
manual.rst: stats_counters.rst
|
2014-07-06 21:18:00 +02:00
|
|
|
touch manual.rst
|
|
|
|
|
2015-10-11 23:09:30 +02:00
|
|
|
#troubleshooting_thumb.png: troubleshooting.png
|
|
|
|
# convert troubleshooting.png -resize 800x800 troubleshooting_thumb.png
|
|
|
|
#ifneq ($(STAGE),)
|
|
|
|
# cp $@ $(WEB_PATH)/$@
|
|
|
|
#endif
|
2014-02-02 11:02:51 +01:00
|
|
|
|
2013-06-14 18:49:06 +02:00
|
|
|
todo.html:gen_todo.py ../src/*.cpp ../include/libtorrent/*.hpp
|
|
|
|
python gen_todo.py
|
2015-10-07 06:48:43 +02:00
|
|
|
ifneq ($(STAGE),)
|
2014-07-10 18:23:47 +02:00
|
|
|
cp $@ $(WEB_PATH)/$@
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
2013-06-14 18:49:06 +02:00
|
|
|
|
2014-08-04 04:16:47 +02:00
|
|
|
$(REFERENCE_TARGETS:=.rst):gen_reference_doc.py ../include/libtorrent/*.hpp ../include/libtorrent/kademlia/*.hpp manual.rst settings.rst stats_counters.rst
|
2013-07-19 18:29:53 +02:00
|
|
|
python gen_reference_doc.py
|
|
|
|
|
2012-12-31 07:51:04 +01:00
|
|
|
%.epub:%.rst
|
2015-10-07 06:48:43 +02:00
|
|
|
rst2epub --exit-status=2 $? $@
|
2012-12-31 07:51:04 +01:00
|
|
|
|
2008-10-17 19:31:20 +02:00
|
|
|
%.pdf:%.rst
|
2015-10-07 06:48:43 +02:00
|
|
|
rst2pdf --exit-status=2 $? -o $@ --stylesheets stylesheet
|
2008-10-17 05:23:30 +02:00
|
|
|
|
|
|
|
%.html:%.rst
|
2015-10-07 06:48:43 +02:00
|
|
|
$(RST2HTML) --exit-status=2 --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
|
|
|
|
ifneq ($(STAGE),)
|
|
|
|
$(RST2HTML) --exit-status=2 --template=template2.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $(WEB_PATH)/$@
|
|
|
|
endif
|
2008-10-17 05:23:30 +02:00
|
|
|
|
2011-03-13 19:19:09 +01:00
|
|
|
%.png:%.dot
|
|
|
|
dot -Tpng $? >$@
|
2015-10-07 06:48:43 +02:00
|
|
|
ifneq ($(STAGE),)
|
2011-03-13 19:19:09 +01:00
|
|
|
cp $@ $(WEB_PATH)/$@
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
2011-03-13 19:19:09 +01:00
|
|
|
|
2009-02-09 04:48:27 +01:00
|
|
|
%.eps:%.dot
|
|
|
|
dot -Teps $? >$@
|
2015-10-07 06:48:43 +02:00
|
|
|
ifneq ($(STAGE),)
|
2009-02-09 04:48:27 +01:00
|
|
|
cp $@ $(WEB_PATH)/$@
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
2009-02-09 04:48:27 +01:00
|
|
|
|
2014-09-01 09:16:31 +02:00
|
|
|
%.png:%.diagram
|
2017-06-14 09:53:09 +02:00
|
|
|
$(AAFIGURE) --scale 0.6 -o $@ $?
|
2015-10-07 06:48:43 +02:00
|
|
|
ifneq ($(STAGE),)
|
2014-09-01 09:16:31 +02:00
|
|
|
cp $@ $(WEB_PATH)/$@
|
2015-10-07 06:48:43 +02:00
|
|
|
endif
|
2014-09-01 09:16:31 +02:00
|
|
|
|
2008-10-17 05:23:30 +02:00
|
|
|
clean:
|
2016-02-19 01:18:10 +01:00
|
|
|
rm -f $(TARGETS:=.html) $(TARGETS:=.pdf) $(FIGURES:=.png) $(FIGURES:=.eps) $(REFERENCE_TARGETS:=.rst) settings.rst todo.html reference*.html stats_counters.rst
|
2008-10-17 05:23:30 +02:00
|
|
|
|