*** empty log message ***
[libtasn1.git] / doc / Makefile.am
blob21cf6c75fa5c767e5afe3b04dc52e5c011459892
1 EXTRA_DIST = gdoc TODO libtasn1.html libtasn1.ps libtasn1.pdf
3 info_TEXINFOS = libtasn1.texi
4 libtasn1_TEXINFOS = fdl.texi $(gdoc_TEXINFOS)
6 dist_man_MANS = $(gdoc_MANS)
8 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
9 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
11 $(gdoc_MANS) $(gdoc_TEXINFOS):
12         make update-makefile
13         make Makefile
14         make doit
16 GDOC_SRC = $(top_srcdir)/lib/*.c
18 update-makefile:
19         @MANS=""; \
20         TEXINFOS=""; \
21         for i in $(GDOC_SRC); do \
22                 BASE=`basename $$i`; \
23                 TEXINFOS="$$TEXINFOS texi/$$BASE.texi"; \
24         done; \
25         FUNCS=`./gdoc -listfunc $(GDOC_SRC)`; \
26         for i in $$FUNCS; do \
27                 MANS="$$MANS man/$$i.3"; \
28                 TEXINFOS="$$TEXINFOS texi/$$i.texi"; \
29         done; \
30         perl -pi -e "s,^gdoc_MANS =.*,gdoc_MANS =$$MANS,;" \
31                 -e "s,^gdoc_TEXINFOS =.*,gdoc_TEXINFOS =$$TEXINFOS,;" \
32                 Makefile.am
34 doit:
35         $(mkdir_p) man texi; \
36         for i in `./gdoc -listfunc $(GDOC_SRC)`; do \
37                 echo -n "Creating documentation for $$i... " && \
38                 ./gdoc -man \
39                         -module $(PACKAGE) -sourceversion $(VERSION) \
40                         -include libtasn1.h \
41                         -seeinfo $(PACKAGE) -verbatimcopying \
42                         -copyright "2001, 2002, 2003 Fabio Fiorina" \
43                         -function $$i \
44                         $(GDOC_SRC) > man/$$i.3 && \
45                 ./gdoc -texinfo -function $$i \
46                         $(GDOC_SRC) > texi/$$i.texi && \
47                 echo "ok"; \
48         done; \
49         for i in $(GDOC_SRC); do \
50                 BASE=`basename $$i`; \
51                 echo -n "Creating documentation for $$i... " && \
52                 ./gdoc -texinfo $$i > texi/$$BASE.texi && \
53                 echo "ok"; \
54         done
56 .PHONY: update-makefile doit