#
-# http://docbook.sourceforge.net/release/xsl/current/README
+# Copyright © 2018 Keith Packard <keithp@keithp.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
if FAKETIME
endif
RELNOTES_INC=\
+ release-notes-1.9.4.inc \
+ release-notes-1.9.3.inc \
+ release-notes-1.9.2.inc \
+ release-notes-1.9.1.inc \
+ release-notes-1.9.inc \
release-notes-1.8.7.inc \
release-notes-1.8.6.inc \
release-notes-1.8.5.inc \
easymega-v1.0-top.jpg \
easymini.svg \
easymini-top.jpg \
+ easytimer.jpg \
fire-igniter.png \
graph-configure.png \
graph-map.png \
config-ui.inc \
load-maps.inc \
aprs-operation.inc \
- handling.inc
+ handling.inc \
+ release-head.inc
INC_FILES=\
+ header.inc \
dedication.inc \
intro.inc \
getting-started.inc \
easymini-device.inc \
telemega.inc \
easymega.inc \
+ easytimer.inc \
installation.inc \
using-am-products.inc \
updating-firmware.inc \
release-notes.inc \
$(RELNOTES_INC)
-RAW_FILES=$(TXT_FILES:.txt=.raw) $(INC_FILES:.inc=.raw)
+ADOC_FILES=$(TXT_FILES:.txt=.adoc) $(INC_FILES:.inc=.adoc)
+
+TELELAUNCH_TXT_FILES=altusmetrum.txt
+
+TELELAUNCH_INC_FILES=\
+ header.inc \
+ telelaunch-acknowledgements.inc \
+ telelaunch-intro.inc \
+ telelaunch-configuration.inc \
+ telelaunch-operation.inc \
+ telelaunch-specs.inc \
+ telelaunch-updating-firmware.inc \
+ telelaunch-cables.inc \
+ telelaunch-troubleshooting.inc
+
+TELELAUNCH_ADOC_FILES=$(TELELAUNCH_TXT_FILES:.txt=.adoc) $(TELELAUNCH_INC_FILES:.inc=.adoc)
TELEGPS_INC_FILES=\
telegps-dedication.inc \
TELEGPS_TXT_FILES=\
telegps.txt
-TELEGPS_RAW_FILES=$(TELEGPS_TXT_FILES:.txt=.raw) $(TELEGPS_INC_FILES:.inc=.raw)
+TELEGPS_ADOC_FILES=$(TELEGPS_TXT_FILES:.txt=.adoc) $(TELEGPS_INC_FILES:.inc=.adoc)
MICROPEAK_TXT_FILES=\
micropeak.txt
MICROPEAK_INC_FILES=
-MICROPEAK_RAW_FILES=$(MICROPEAK_TXT_FILES:.txt=.raw) $(MICROPEAK_INC_FILES:.inc=.raw)
+MICROPEAK_ADOC_FILES=$(MICROPEAK_TXT_FILES:.txt=.adoc) $(MICROPEAK_INC_FILES:.inc=.adoc)
EASYMINI_TXT_FILES=\
easymini.txt
EASYMINI_INC_FILES=$(INC_FILES) easymini-release-notes.inc
-EASYMINI_RAW_FILES=$(EASYMINI_TXT_FILES:.txt=.raw) $(EASYMINI_INC_FILES:.inc=.raw)
+EASYMINI_ADOC_FILES=$(EASYMINI_TXT_FILES:.txt=.adoc) $(EASYMINI_INC_FILES:.inc=.adoc)
OUTLINE_TXT_FILES=\
easymega-outline.txt \
telemini-v3-outline.txt \
telegps-outline.txt
-OUTLINE_RAW_FILES=$(OUTLINE_TXT_FILES:.txt=.raw)
+OUTLINE_ADOC_FILES=$(OUTLINE_TXT_FILES:.txt=.adoc)
OUTLINE_PDF_FILES=$(OUTLINE_TXT_FILES:.txt=.pdf)
telemetry.txt \
map-loading.txt
-ONEFILE_RAW_FILES=$(ONEFILE_TXT_FILES:.txt=.raw)
+ONEFILE_ADOC_FILES=$(ONEFILE_TXT_FILES:.txt=.adoc)
ONEFILE_PDF_FILES=$(ONEFILE_TXT_FILES:.txt=.pdf)
ONEFILE_HTML_FILES=$(ONEFILE_TXT_FILES:.txt=.html)
AM_HTML=am.html
-PUBLISH_HTML=altusmetrum.html micropeak.html telegps.html easymini.html $(ONEFILE_HTML_FILES)
+PUBLISH_HTML=altusmetrum.html micropeak.html telegps.html easymini.html telelaunch.html $(ONEFILE_HTML_FILES)
HTML=$(PUBLISH_HTML) $(RELNOTES_HTML)
-HTML_REVHISTORY=\
- altusmetrum-revhistory.html \
- micropeak-revhistory.html \
- telegps-revhistory.html \
- easymini-revhistory.html
-
-PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf $(ONEFILE_PDF_FILES) \
+if ASCIIDOCTOR_PDF
+PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf telelaunch.pdf $(ONEFILE_PDF_FILES) \
$(OUTLINE_PDF_FILES)
+endif
MAP_DOT_FILES=map-loading.dot
MAP_SVG_FILES=$(MAP_DOT_FILES:.dot=.svg)
-FOP_STYLE=am-fo.xsl
-HTML_STYLE=am-html.xsl
-COMMON_STYLE=common.xsl
-FOP_XCONF=fop.xconf
-STYLESHEET=am.css
+STYLESHEET=am.css am-notoc.css
FONTS=\
fonts/DejaVuSansMono-BoldOblique.ttf \
fonts/OpenSans-Semibold.ttf \
fonts/OpenSans-SemiboldItalic.ttf
-TEMPLATES_TMPL=titlepage.templates.tmpl
+ICONS=\
+ images/icons/caution.svg \
+ images/icons/important.svg \
+ images/icons/note.svg \
+ images/icons/tip.svg \
+ images/icons/warning.svg
-TEMPLATES_XSL=$(TEMPLATES_TMPL:.tmpl=.xsl)
+PDF_CONFIG_FILES=altusmetrum-theme.yml
+HTML_CONFIG_FILES=
-PDF_CONFIG_FILES=$(FOP_STYLE) $(COMMON_STYLE) $(FOP_XCONF) $(TEMPLATES_XSL)
-HTML_CONFIG_FILES=$(HTML_STYLE) $(COMMON_STYLE) $(TEMPLATES_XSL)
+PUBLISH_DOC=$(PUBLISH_HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET)
-PUBLISH_DOC=$(PUBLISH_HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET)
+DOC=$(HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET)
-DOC=$(HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET)
+SUFFIXES = .dot .svg .inc .txt .adoc .pdf .html
-SUFFIXES = .dot .svg .tmpl .xsl .inc .txt .raw .pdf .html
+ATTRIBUTES=--attribute="revdate=$(DOC_DATE)" --attribute="version=$(VERSION)"
.dot.svg:
dot -Tsvg -o$@ $*.dot
-.txt.raw:
+.txt.adoc:
sed -e 's/^[ ]*//' -e 's/^\\//' $*.txt > $@
-.inc.raw:
+.inc.adoc:
sed -e 's/^[ ]*//' -e 's/^\\//' $*.inc > $@
-.raw.html:
- a2x -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(HTML_STYLE) --stylesheet=$(STYLESHEET) $*.raw
- case $* in release-notes*) ./fix-html $*.html ;; esac
- $(FAKETIME) a2x -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw
-
-.html.pdf:
- echo $@
+.adoc.html:
+ asciidoctor $(ATTRIBUTES) -b html5 $*.adoc
-.tmpl.xsl:
- xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl
+.adoc.pdf:
+ asciidoctor-pdf $(ATTRIBUTES) $*.adoc
all: $(HTML) $(PDF)
-map-loading.raw: $(MAP_SVG_FILES)
-
-altusmetrum-revhistory.html: altusmetrum.html
-
-micropeak-revhistory.html: micropeak.html
+map-loading.adoc: $(MAP_SVG_FILES)
-telegps-revhistory.html: telegps.html
+altusmetrum.pdf altusmetrum.html: $(ADOC_FILES) $(IMAGES)
-altusmetrum.pdf altusmetrum.html: altusmetrum-docinfo.xml $(RAW_FILES) $(IMAGES)
+telelaunch.pdf telelaunch.html: $(TELELAUNCH_ADOC_FILES) $(IMAGES)
-telegps.html telegps.pdf: telegps-docinfo.xml $(TELEGPS_RAW_FILES) $(IMAGES)
+telegps.html telegps.pdf: $(TELEGPS_ADOC_FILES) $(IMAGES)
-micropeak.pdf micropeak.html: micropeak-docinfo.xml $(MICROPEAK_RAW_FILES) $(IMAGES)
+micropeak.pdf micropeak.html: $(MICROPEAK_ADOC_FILES) $(IMAGES)
-easymini.pdf easymini.html: easymini-docinfo.xml $(EASYMINI_RAW_FILES) $(IMAGES)
+easymini.pdf easymini.html: $(EASYMINI_ADOC_FILES) $(IMAGES)
telemini-v1-outline.pdf: telemini-v1-outline.txt telemini-v1.svg
WEB_ROOT=/home/bdale/web/
-publish: $(PUBLISH_DOC) $(FONTS)
- cp $(PUBLISH_DOC) $(WEB_ROOT)/altusmetrum/AltOS/doc/
+publish: $(PUBLISH_DOC) $(FONTS) $(ICONS)
+ cp -a $(PUBLISH_DOC) $(WEB_ROOT)/altusmetrum/AltOS/doc/
mkdir -p $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
cp $(FONTS) $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
+ mkdir -p $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/
+ cp $(ICONS) $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/
(cd $(WEB_ROOT)/altusmetrum ; \
git add $(WEB_ROOT)/altusmetrum/AltOS/doc/* ; \
git add $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* ; \
+ git add $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/* ;\
echo "update docs" | \
- git commit -F - $(WEB_ROOT)/altusmetrum/AltOS/doc/* $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* ; \
+ git commit -F - $(WEB_ROOT)/altusmetrum/AltOS/doc/* $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons ; \
git push)
-publish-keithp: am.html $(PUBLISH_DOC) $(FONTS)
- scp -p am.html $(PUBLISH_DOC) keithp.com:~keithp/public_html/altos
+publish-keithp: am.html $(DOC) $(FONTS)
+ ssh keithp.com 'mkdir -p ~keithp/public_html/altos/fonts ~keithp/public_html/altos/images/icons'
+ scp -p am.html $(DOC) keithp.com:~keithp/public_html/altos
scp -p $(FONTS) keithp.com:~keithp/public_html/altos/fonts
+ scp -p $(ICONS) keithp.com:~keithp/public_html/altos/images/icons
clean:
- rm -f am.html $(HTML) $(HTML_REVHISTORY) $(PDF) $(TEMPLATES_XSL) $(RAW_FILES) $(TELEGPS_RAW_FILES) $(MICROPEAK_RAW_FILES)
+ rm -f am.html $(HTML) $(PDF) $(ADOC_FILES) $(TELEGPS_ADOC_FILES) $(MICROPEAK_ADOC_FILES) $(TELELAUNCH_ADOC_FILES)
distclean: clean
rm -f $(HTML) $(PDF)