X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=doc%2FMakefile.am;h=cdd7a339e8e72581a16b4952e56f9bbeafabd09b;hp=5f2ab026dff0d447cb4689ecc435021da6876bf1;hb=c411c7ec71be0263a958c0803772cd6068e6bdad;hpb=5a95ed9c9419c15352b8dc1d895c9adce30f99f5 diff --git a/doc/Makefile.am b/doc/Makefile.am index 5f2ab026..cdd7a339 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,23 @@ # -# http://docbook.sourceforge.net/release/xsl/current/README +# Copyright © 2018 Keith Packard +# +# 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. # -FAKETIME=$(RELEASE_DATE) 00:00:00 +if FAKETIME +FAKETIME=TZ=UTC faketime -f '$(RELEASE_DATE) 00:00:00 i0' +endif RELNOTES_INC=\ + release-notes-1.9.inc \ release-notes-1.8.7.inc \ release-notes-1.8.6.inc \ release-notes-1.8.5.inc \ @@ -113,9 +126,11 @@ COMMON_INC_FILES=\ 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 \ @@ -138,7 +153,22 @@ INC_FILES=\ 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 \ @@ -154,14 +184,14 @@ TELEGPS_INC_FILES=\ 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 @@ -169,7 +199,7 @@ EASYMINI_TXT_FILES=\ 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 \ @@ -180,7 +210,7 @@ OUTLINE_TXT_FILES=\ 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) @@ -200,32 +230,24 @@ ONEFILE_TXT_FILES=\ 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 \ @@ -239,55 +261,50 @@ FONTS=\ fonts/OpenSans-Semibold.ttf \ fonts/OpenSans-SemiboldItalic.ttf -TEMPLATES_TMPL=titlepage.templates.tmpl - -TEMPLATES_XSL=$(TEMPLATES_TMPL:.tmpl=.xsl) +ICONS=\ + images/icons/caution.svg \ + images/icons/important.svg \ + images/icons/note.svg \ + images/icons/tip.svg \ + images/icons/warning.svg -PDF_CONFIG_FILES=$(FOP_STYLE) $(COMMON_STYLE) $(FOP_XCONF) $(TEMPLATES_XSL) -HTML_CONFIG_FILES=$(HTML_STYLE) $(COMMON_STYLE) $(TEMPLATES_XSL) +PDF_CONFIG_FILES=altusmetrum-theme.yml +HTML_CONFIG_FILES= -PUBLISH_DOC=$(PUBLISH_HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET) +PUBLISH_DOC=$(PUBLISH_HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET) -DOC=$(HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET) +DOC=$(HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET) -SUFFIXES = .dot .svg .tmpl .xsl .inc .txt .raw .pdf .html +SUFFIXES = .dot .svg .inc .txt .adoc .pdf .html .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 - -.html.pdf: - TZ=UTC faketime -f '$(FAKETIME) i0' a2x -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw +.adoc.html: + asciidoctor -b html5 $*.adoc -.tmpl.xsl: - xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl +.adoc.pdf: + asciidoctor-pdf $*.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 @@ -297,23 +314,28 @@ install: all 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)