Move external libdeps after our own
[heimdal.git] / doc / Makefile.am
blobc4d5fab923e4bf129e5d4007e42c700007d71776
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AUTOMAKE_OPTIONS = no-texinfo.tex
7 MAKEINFOFLAGS = --css-include=$(srcdir)/heimdal.css
9 TEXI2DVI = true # ARGH, make distcheck can't be disabled to not build dvifiles
11 info_TEXINFOS = heimdal.texi hx509.texi
13 dxy_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
14         -e 's,[@]objdir[@],.,g' \
15         -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
17 hcrypto.dxy: hcrypto.din Makefile
18         $(dxy_subst) < $(srcdir)/hcrypto.din > hcrypto.dxy.tmp
19         chmod +x hcrypto.dxy.tmp
20         mv hcrypto.dxy.tmp hcrypto.dxy
22 hdb.dxy: hdb.din Makefile
23         $(dxy_subst) < $(srcdir)/hdb.din > hdb.dxy.tmp
24         chmod +x hdb.dxy.tmp
25         mv hdb.dxy.tmp hdb.dxy
27 base.dxy: base.din Makefile
28         $(dxy_subst) < $(srcdir)/base.din > base.dxy.tmp
29         chmod +x base.dxy.tmp
30         mv base.dxy.tmp base.dxy
32 hx509.dxy: hx509.din Makefile
33         $(dxy_subst) < $(srcdir)/hx509.din > hx509.dxy.tmp
34         chmod +x hx509.dxy.tmp
35         mv hx509.dxy.tmp hx509.dxy
37 gssapi.dxy: gssapi.din Makefile
38         $(dxy_subst) < $(srcdir)/gssapi.din > gssapi.dxy.tmp
39         chmod +x gssapi.dxy.tmp
40         mv gssapi.dxy.tmp gssapi.dxy
42 krb5.dxy: krb5.din Makefile
43         $(dxy_subst) < $(srcdir)/krb5.din > krb5.dxy.tmp
44         chmod +x krb5.dxy.tmp
45         mv krb5.dxy.tmp krb5.dxy
47 ntlm.dxy: ntlm.din Makefile
48         $(dxy_subst) < $(srcdir)/ntlm.din > ntlm.dxy.tmp
49         chmod +x ntlm.dxy.tmp
50         mv ntlm.dxy.tmp ntlm.dxy
52 wind.dxy: wind.din Makefile
53         $(dxy_subst) < $(srcdir)/wind.din > wind.dxy.tmp
54         chmod +x wind.dxy.tmp
55         mv wind.dxy.tmp wind.dxy
57 texi_subst = sed -e 's,[@]dbdir[@],$(localstatedir),g' \
58         -e 's,[@]dbtype[@],$(db_type),g' \
59         -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
61 vars.texi: vars.tin Makefile
62         $(texi_subst) < $(srcdir)/vars.tin > vars.texi.tmp
63         chmod +x vars.texi.tmp
64         mv vars.texi.tmp vars.texi
66 PROJECTS = base hdb hx509 gssapi krb5 ntlm wind 
68 PROJECTS += hcrypto
70 doxyout doxygen: base.dxy hdb.dxy hx509.dxy hcrypto.dxy gssapi.dxy krb5.dxy ntlm.dxy wind.dxy
71         @find $(srcdir)/doxyout -type d ! -perm -200 -exec chmod u+w {} ';' ; \
72         rm -rf $(srcdir)/doxyout ; \
73         mkdir $(srcdir)/doxyout ; \
74         for a in $(PROJECTS) ; do \
75                 echo $$a ; \
76                 doxygen $$a.dxy; \
77                 (cd $(srcdir)/doxyout && \
78                     find $$a/man -name '_*' -type f -print | \
79                         perl -lne unlink && \
80                     find $$a/html -name 'dir_*.html' -type f -print | \
81                         perl -lne unlink && \
82                  find $$a/man -type f > $$a/manpages ) ; \
83         done
85 install-data-hook: install-doxygen-manpage
86 uninstall-hook: uninstall-doxygen-manpage
87 dist-hook: doxygen
89 install-doxygen-manpage:
90         for a in $(PROJECTS) ; do \
91                 f="$(srcdir)/doxyout/$$a/manpages" ; \
92                 test -f $$f || continue ; \
93                 echo "install $$a manual pages $$(wc -l < $$f)" ; \
94                 while read x ; do \
95                         section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
96                         $(mkinstalldirs) "$(DESTDIR)$(mandir)/man$$section" ; \
97                         $(INSTALL_DATA) $(srcdir)/doxyout/$$x "$(DESTDIR)$(mandir)/man$$section" ; \
98                 done < $$f ; \
99         done ; exit 0
101 uninstall-doxygen-manpage:
102         @for a in $(PROJECTS) ; do \
103                 f="$(srcdir)/doxyout/$$a/manpages" ; \
104                 test -f $$f || continue ; \
105                 echo "removing $$a manual pages" ; \
106                 while read x ; do \
107                         section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
108                         base=`basename $$x` ; \
109                         rm "$(DESTDIR)$(mandir)/man$$section/$$base" ; \
110                 done < $$f ; \
111         done
114 heimdal_TEXINFOS = \
115         ack.texi \
116         apps.texi \
117         copyright.texi \
118         heimdal.texi \
119         install.texi \
120         intro.texi \
121         kerberos4.texi \
122         migration.texi \
123         misc.texi \
124         programming.texi \
125         setup.texi \
126         vars.texi \
127         whatis.texi \
128         win2k.texi
130 EXTRA_DIST = \
131         NTMakefile \
132         doxyout \
133         footer.html \
134         gssapi.din \
135         hdb.din \
136         hcrypto.din \
137         header.html \
138         heimdal.css \
139         base.din \
140         hx509.din \
141         krb5.din \
142         ntlm.din \
143         init-creds \
144         latin1.tex \
145         layman.asc \
146         doxytmpl.dxy \
147         wind.din \
148         base.hhp \
149         heimdal.hhp \
150         hx509.hhp \
151         vars.tin
153 CLEANFILES = \
154         hcrypto.dxy* \
155         base.dxy* \
156         hx509.dxy* \
157         hdb.dxy* \
158         gssapi.dxy* \
159         krb5.dxy* \
160         ntlm.dxy* \
161         wind.dxy* \
162         vars.texi*