aboutsummaryrefslogtreecommitdiffstats
path: root/docbook
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-04-29 22:50:04 +0100
committerJoão Valverde <j@v6e.pt>2016-05-10 15:15:30 +0000
commite4237b14d038899f15401fbf9ef1bda6dda874f6 (patch)
tree975479b5469550d89937c1ca4cc8106dcbf1bdab /docbook
parent1c862d25849de95344cf8eb88c8b811aa414c7a5 (diff)
autotools: docbook build improvements
Let the make recipe fail if a dependency is missing. That is more user-friendly (a2x: command not found) than an empty target and having to re-run configure. Test for both w3m and lynx when generating text files. If neither is available skip it. Add an explicit target to build pdf documentation. Change-Id: I760475acd7278f5ab5a782c1828a134c58cf7b42 Reviewed-on: https://code.wireshark.org/review/15229 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'docbook')
-rw-r--r--docbook/Makefile.am48
1 files changed, 12 insertions, 36 deletions
diff --git a/docbook/Makefile.am b/docbook/Makefile.am
index c31eb8d353..d67543b2e7 100644
--- a/docbook/Makefile.am
+++ b/docbook/Makefile.am
@@ -14,10 +14,6 @@ FOP_OPTS=-Xmx256m
A2X_HTML_OPTS="--stylesheet=ws.css"
A2X_TEXT_OPTS=
-#if HAVE_LYNX
-A2X_TEXT_OPTS+="--lynx"
-#endif
-
############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
include Makefile.common
@@ -25,28 +21,16 @@ include Makefile.common
# Automatically generate .pdf files from .fo files
# Suse needs FOP_OPTS, Debian needs JAVA_OPTS
.fo.pdf:
-if HAVE_FOP
FOP_OPTS=$(FOP_OPTS) JAVA_OPTS=$(FOP_OPTS) $(FOP) $< $@
-else
- @echo
- @echo "Error: FOP is needed to create PDFs!"
- @false
-endif
-if HAVE_XSLTPROC
-ALL_TARGETS=wsug wsdg release_notes
-endif
+all: wsug wsdg release-notes
-all: $(ALL_TARGETS)
+all-pdf: wsug-pdf wsdg-pdf release-notes-pdf
# Wireshark User Guide
-if HAVE_FOP
-WSUG_TARGETS=wsug_html_chunked wsug_html user-guide-a4.pdf user-guide-us.pdf
-else
-WSUG_TARGETS=wsug_html_chunked wsug_html
-endif
+wsug: wsug_html_chunked wsug_html
-wsug: $(WSUG_TARGETS)
+wsug-pdf: wsug user-guide-a4.pdf user-guide-us.pdf
user-guide.xml: user-guide.asciidoc $(WSUG_FILES)
$(A2X) --verbose \
@@ -106,17 +90,9 @@ wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
# Wireshark Developer Guide
-if HAVE_A2X
-if HAVE_FOP
-WSDG_TARGETS=wsdg_html_chunked wsdg_html developer-guide-a4.pdf developer-guide-us.pdf
-else
-WSDG_TARGETS=wsdg_html_chunked wsdg_html
-endif
-else
-WSDG_TARGETS=
-endif
+wsdg: wsdg_html_chunked wsdg_html
-wsdg: $(WSDG_TARGETS)
+wsdg-pdf: wsdg developer-guide-a4.pdf developer-guide-us.pdf
developer-guide.xml: developer-guide.asciidoc $(WSDG_FILES)
$(A2X) --verbose \
@@ -173,14 +149,14 @@ developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
--path .:wsluarm_src:$(srcdir) \
--nonet $(srcdir)/custom_layer_pdf.xsl $< > $@
-
-if HAVE_FOP
-RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
+# Release notes
+if HAVE_A2X_TEXT
+release-notes: release-notes.html release-notes.txt
else
-RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt
+release-notes: release-notes.html
endif
-release_notes: $(RELEASE_NOTES_TARGETS)
+release-notes-pdf: release-notes release-notes-a4.pdf release-notes-us.pdf
# create html single page file
release-notes.html: $(RELEASE_NOTES_SOURCE)
@@ -192,7 +168,7 @@ release-notes.html: $(RELEASE_NOTES_SOURCE)
# create txt single page file (through HTML)
release-notes.txt: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - TXT ---
- TZ=UTC $(A2X) --format=text $(A2X_TEXT_OPTS) \
+ TZ=UTC $(A2X) --format=text @A2X_LYNX@ $(A2X_TEXT_OPTS) \
--xsltproc-opts "--stringparam generate.toc \"article nop\"" \
--destination-dir=$(builddir) \
$(srcdir)/release-notes.asciidoc && \