doc: Fix deps. Generate --help from tools.
Signed-off-by: Simon Josefsson <simon@josefsson.org>
diff --git a/README.md b/README.md
index 20abcf2..b0305b9 100644
--- a/README.md
+++ b/README.md
@@ -35,18 +35,17 @@
Debian/Ubuntu:
```
sudo apt-get install make git autoconf automake libtool bison
-sudo apt-get install texinfo texlive texlive-extra-utils
-sudo apt-get install help2man gtk-doc-tools valgrind abigail-tools
+sudo apt-get install texinfo help2man gtk-doc-tools valgrind abigail-tools
```
-Debian <= stretch:
+PDF manual - Debian <= stretch:
```
-sudo apt-get install texlive-generic-recommended
+sudo apt-get install texlive-generic-recommended texlive texlive-extra-utils
```
-Debian >= buster:
+PDF manual - Debian >= buster:
```
-sudo apt-get install texlive-plain-generic
+sudo apt-get install texlive-plain-generic texlive texlive-extra-utils
```
The next step is to run autoreconf, ./configure, etc:
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c6b753a..a0171a5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -24,6 +24,7 @@
info_TEXINFOS = libtasn1.texi
libtasn1_TEXINFOS = fdl-1.3.texi $(gdoc_TEXINFOS)
+libtasn1_TEXINFOS += asn1Coding-help.texi asn1Decoding-help.texi asn1Parser-help.texi
AM_MAKEINFOHTMLFLAGS = --no-split $(AM_MAKEINFOFLAGS)
@@ -31,11 +32,6 @@
HELP2MAN_OPTS = --info-page libtasn1
-asn1Parser.1: $(top_srcdir)/src/asn1Parser.c $(top_srcdir)/.version
- $(AM_V_GEN)$(HELP2MAN) $(HELP2MAN_OPTS) \
- --name="ASN.1 syntax tree generator for libtasn1" \
- --output=$@ $(top_builddir)/src/asn1Parser$(EXEEXT)
-
asn1Coding.1: $(top_srcdir)/src/asn1Coding.c $(top_srcdir)/.version
$(AM_V_GEN)$(HELP2MAN) $(HELP2MAN_OPTS) \
--name="ASN.1 DER encoder" \
@@ -46,6 +42,23 @@
--name="ASN.1 DER decoder" \
--output=$@ $(top_builddir)/src/asn1Decoding$(EXEEXT)
+asn1Parser.1: $(top_srcdir)/src/asn1Parser.c $(top_srcdir)/.version
+ $(AM_V_GEN)$(HELP2MAN) $(HELP2MAN_OPTS) \
+ --name="ASN.1 syntax tree generator for libtasn1" \
+ --output=$@ $(top_builddir)/src/asn1Parser$(EXEEXT)
+
+asn1Coding-help.texi: $(top_srcdir)/src/asn1Coding.c
+ $(AM_V_GEN)$(top_builddir)/src/asn1Coding$(EXEEXT) --help > tmp-$@ && \
+ mv tmp-$@ asn1Coding-help.texi
+
+asn1Decoding-help.texi: $(top_srcdir)/src/asn1Decoding.c
+ $(AM_V_GEN)$(top_builddir)/src/asn1Decoding$(EXEEXT) --help > tmp-$@ && \
+ mv tmp-$@ asn1Decoding-help.texi
+
+asn1Parser-help.texi: $(top_srcdir)/src/asn1Parser.c
+ $(AM_V_GEN)$(top_builddir)/src/asn1Parser$(EXEEXT) --help > tmp-$@ && \
+ mv tmp-$@ asn1Parser-help.texi
+
gdoc_MANS =
gdoc_MANS += man/asn1_get_length_der.3
gdoc_MANS += man/asn1_get_tag_der.3
diff --git a/doc/libtasn1.texi b/doc/libtasn1.texi
index 2879d28..c6dbfa4 100644
--- a/doc/libtasn1.texi
+++ b/doc/libtasn1.texi
@@ -313,16 +313,7 @@
generates a
file with an array to use with libtasn1 functions.
-@verbatim
-Usage: asn1Parser [options] file
-
-Options:
- -h : shows the help message.
- -v : shows version information and exit.
- -c : checks the syntax only.
- -o file : output file.
- -n name : array name.
-@end verbatim
+@verbatiminclude asn1Parser-help.texi
@node Invoking asn1Coding
@section Invoking asn1Coding
@@ -349,16 +340,7 @@
The output file is a binary file with the DER encoding.
-@verbatim
-Usage: asn1Coding [options] file1 file2
- file1 : file with ASN1 definitions.
- file2 : file with assignments.
-Options:
- -h : shows the help message.
- -v : shows version information and exit.
- -c : checks the syntax only.
- -o file : output file.
-@end verbatim
+@verbatiminclude asn1Coding-help.texi
For example, consider an ASN.1 definitions file as follows:
@@ -423,16 +405,7 @@
ASN.1
definitions and a binary file with a DER encoding.
-@verbatim
-Usage: asn1Decoding [options] file1 file2 type
- file1 : file with ASN1 definitions.
- file2 : binary file with a DER encoding.
- type : ASN1 definition name.
-Options:
- -h : shows the help message.
- -v : shows version information and exit.
- -o file : output file.
-@end verbatim
+@verbatiminclude asn1Decoding-help.texi
For example, after generating the @file{assign.out} file from the
example section of the @command{asn1Coding} command above, the