summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2004-12-10 14:35:29 +0000
committerSimon Josefsson <simon@josefsson.org>2004-12-10 14:35:29 +0000
commit785b0d00bfc38cf80027c7d424245f7d4f8e4be6 (patch)
treecdf3c66a8225f94a39abec2952a6701eeee9af4d /doc
parent789797bb97f26cb89272f19c5f87b4e0d0d3c9ce (diff)
downloadlibtasn1-785b0d00bfc38cf80027c7d424245f7d4f8e4be6.tar.gz
libtasn1-785b0d00bfc38cf80027c7d424245f7d4f8e4be6.tar.bz2
libtasn1-785b0d00bfc38cf80027c7d424245f7d4f8e4be6.zip
Build texinfo manual.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am63
1 files changed, 50 insertions, 13 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6b07988..21cf6c7 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,19 +1,56 @@
-EXTRA_DIST = asn1.tex asn1.ps fdl.tex TODO
-SUBDIRS = scripts
+EXTRA_DIST = gdoc TODO libtasn1.html libtasn1.ps libtasn1.pdf
+info_TEXINFOS = libtasn1.texi
+libtasn1_TEXINFOS = fdl.texi $(gdoc_TEXINFOS)
-TEX_OBJECTS = asn1.tex ../lib/asn1-api.tex
+dist_man_MANS = $(gdoc_MANS)
-asn1.ps: $(TEX_OBJECTS)
- -$(LN_S) ../lib/asn1-api.tex .
- -latex asn1.tex && latex asn1.tex && dvips asn1.dvi -o asn1.ps
+gdoc_MANS = man/asn1_parser2tree.3 man/asn1_parser2array.3 man/asn1_der_coding.3 man/asn1_der_decoding.3 man/asn1_der_decoding_element.3 man/asn1_der_decoding_startEnd.3 man/asn1_expand_any_defined_by.3 man/asn1_expand_octet_string.3 man/asn1_write_value.3 man/asn1_read_value.3 man/asn1_read_tag.3 man/libtasn1_perror.3 man/libtasn1_strerror.3 man/asn1_check_version.3 man/asn1_array2tree.3 man/asn1_delete_structure.3 man/asn1_delete_element.3 man/asn1_create_element.3 man/asn1_print_structure.3 man/asn1_number_of_elements.3 man/asn1_find_structure_from_oid.3
+gdoc_TEXINFOS = texi/ASN1.c.texi texi/coding.c.texi texi/decoding.c.texi texi/element.c.texi texi/errors.c.texi texi/gstr.c.texi texi/parser_aux.c.texi texi/structure.c.texi texi/asn1_parser2tree.texi texi/asn1_parser2array.texi texi/asn1_der_coding.texi texi/asn1_der_decoding.texi texi/asn1_der_decoding_element.texi texi/asn1_der_decoding_startEnd.texi texi/asn1_expand_any_defined_by.texi texi/asn1_expand_octet_string.texi texi/asn1_write_value.texi texi/asn1_read_value.texi texi/asn1_read_tag.texi texi/libtasn1_perror.texi texi/libtasn1_strerror.texi texi/asn1_check_version.texi texi/asn1_array2tree.texi texi/asn1_delete_structure.texi texi/asn1_delete_element.texi texi/asn1_create_element.texi texi/asn1_print_structure.texi texi/asn1_number_of_elements.texi texi/asn1_find_structure_from_oid.texi
-asn1.html: asn1.ps $(TEX_OBJECTS)
- -latex2html asn1.tex -no_navigation -split 0 -local_icons -html_version 3.2,math \
- -info "" -white
+$(gdoc_MANS) $(gdoc_TEXINFOS):
+ make update-makefile
+ make Makefile
+ make doit
+GDOC_SRC = $(top_srcdir)/lib/*.c
-clean:
- @-rm *.log *.aux *.toc
- @-rm *.pl index.html asn1.dvi
- @-rm WARNINGS asn1-api.tex
+update-makefile:
+ @MANS=""; \
+ TEXINFOS=""; \
+ for i in $(GDOC_SRC); do \
+ BASE=`basename $$i`; \
+ TEXINFOS="$$TEXINFOS texi/$$BASE.texi"; \
+ done; \
+ FUNCS=`./gdoc -listfunc $(GDOC_SRC)`; \
+ for i in $$FUNCS; do \
+ MANS="$$MANS man/$$i.3"; \
+ TEXINFOS="$$TEXINFOS texi/$$i.texi"; \
+ done; \
+ perl -pi -e "s,^gdoc_MANS =.*,gdoc_MANS =$$MANS,;" \
+ -e "s,^gdoc_TEXINFOS =.*,gdoc_TEXINFOS =$$TEXINFOS,;" \
+ Makefile.am
+
+doit:
+ $(mkdir_p) man texi; \
+ for i in `./gdoc -listfunc $(GDOC_SRC)`; do \
+ echo -n "Creating documentation for $$i... " && \
+ ./gdoc -man \
+ -module $(PACKAGE) -sourceversion $(VERSION) \
+ -include libtasn1.h \
+ -seeinfo $(PACKAGE) -verbatimcopying \
+ -copyright "2001, 2002, 2003 Fabio Fiorina" \
+ -function $$i \
+ $(GDOC_SRC) > man/$$i.3 && \
+ ./gdoc -texinfo -function $$i \
+ $(GDOC_SRC) > texi/$$i.texi && \
+ echo "ok"; \
+ done; \
+ for i in $(GDOC_SRC); do \
+ BASE=`basename $$i`; \
+ echo -n "Creating documentation for $$i... " && \
+ ./gdoc -texinfo $$i > texi/$$BASE.texi && \
+ echo "ok"; \
+ done
+
+.PHONY: update-makefile doit