2018-01-10 15:59:37 +01:00
|
|
|
all: update_content html pdf
|
2016-11-02 15:33:41 +01:00
|
|
|
|
2018-01-08 12:39:43 +01:00
|
|
|
html:
|
2017-12-23 22:22:41 +01:00
|
|
|
# docs -> docs_final
|
2015-06-18 16:33:34 +02:00
|
|
|
./markdown2mkdocs.py
|
2018-01-10 15:59:37 +01:00
|
|
|
# generate HTML
|
2015-05-05 12:07:25 +02:00
|
|
|
mkdocs build --clean
|
2018-01-10 15:59:37 +01:00
|
|
|
# post-process HTML
|
|
|
|
./mkdocs2html.py
|
2016-11-02 15:33:41 +01:00
|
|
|
|
|
|
|
pdf:
|
2018-01-10 15:59:37 +01:00
|
|
|
rm -rf latex
|
2015-06-05 17:38:11 +02:00
|
|
|
mkdir -p latex
|
|
|
|
cp -r docs/picts latex
|
2021-05-25 08:53:22 +02:00
|
|
|
# create latex/btstack_gettingstartec.tex with version
|
|
|
|
./update_getting_started.sh
|
2017-12-23 22:22:41 +01:00
|
|
|
# create latex/btstack_generated.md -> latex/btstack_final.tex
|
|
|
|
./markdown2tex.py
|
2017-12-23 23:39:25 +01:00
|
|
|
cp docs/ports/*.jpg latex
|
2015-06-05 17:38:11 +02:00
|
|
|
cd latex && pdflatex btstack_gettingstarted.tex && pdflatex btstack_gettingstarted.tex
|
2015-06-18 16:33:34 +02:00
|
|
|
mv latex/btstack_gettingstarted.pdf btstack.pdf
|
2016-11-02 15:33:41 +01:00
|
|
|
|
2018-01-10 15:59:37 +01:00
|
|
|
preview: update_content html
|
2020-10-06 11:52:23 +02:00
|
|
|
# race condition, open browser before starting MKdocs server
|
2021-05-25 15:08:50 +02:00
|
|
|
open http://127.0.0.1:8010
|
|
|
|
mkdocs serve -a localhost:8010
|
2016-11-02 15:33:41 +01:00
|
|
|
|
2018-01-10 15:59:37 +01:00
|
|
|
update_content:
|
2021-05-25 15:08:50 +02:00
|
|
|
sed -e "s|../doc/manual/docs-template/||g" ../../chipset/README.md > docs-template/chipsets.md
|
2016-11-02 15:33:41 +01:00
|
|
|
rm -rf tmp
|
|
|
|
mkdir tmp
|
2020-10-06 11:52:23 +02:00
|
|
|
# create mkdocs.yml
|
|
|
|
./update_mkdocs_yml.sh
|
2021-05-25 15:08:50 +02:00
|
|
|
# create docs-template/appendix/apis.md
|
2016-11-02 15:33:41 +01:00
|
|
|
./update_apis.py
|
2021-05-25 15:08:50 +02:00
|
|
|
# create docs-template/examples/examples.md
|
2016-11-02 15:33:41 +01:00
|
|
|
./update_listings.py
|
2021-05-25 15:08:50 +02:00
|
|
|
# create docs-template/ports/existing_ports.md
|
2018-01-10 15:59:37 +01:00
|
|
|
./ports2markdown.py
|
2021-05-25 15:08:50 +02:00
|
|
|
# create docs-template/gatt_clients.md and docs-template/gatt_services.md
|
2021-05-19 09:55:26 +02:00
|
|
|
./update_gatt_services.py
|
2018-01-10 15:59:37 +01:00
|
|
|
# re-create docs_final
|
2021-05-25 15:08:50 +02:00
|
|
|
rm -rf docs
|
|
|
|
cp -r docs-template docs
|
2016-11-02 15:33:41 +01:00
|
|
|
|
2016-01-21 12:21:03 +01:00
|
|
|
clean:
|
2021-05-25 15:08:50 +02:00
|
|
|
rm -rf docs tmp btstack *.pdf latex/btstack_generated.* latex/btstack_final.tex mkdocs.yml
|
|
|
|
rm -rf docs-template/appendix/apis.md docs-template/examples/examples.md docs-template/chipsets.md
|
|
|
|
rm -rf docs-template/gatt_clients.md docs-template/gatt_services.md
|
|
|
|
rm -rf api_index.md
|
2017-12-23 22:22:41 +01:00
|
|
|
rm -rf latex btstack help
|
2016-03-09 10:34:41 +01:00
|
|
|
|
2015-06-05 15:20:02 +02:00
|
|
|
|
|
|
|
|