xref: /freebsd/crypto/heimdal/doc/Makefile.am (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1# $Id$
2
3include $(top_srcdir)/Makefile.am.common
4
5AUTOMAKE_OPTIONS = no-texinfo.tex
6
7MAKEINFOFLAGS = --css-include=$(srcdir)/heimdal.css
8
9TEXI2DVI = true # ARGH, make distcheck can't be disabled to not build dvifiles
10
11info_TEXINFOS = heimdal.texi hx509.texi
12
13dxy_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
14	-e 's,[@]objdir[@],.,g' \
15	-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
16
17hcrypto.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
21
22hdb.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
26
27hx509.dxy: hx509.din Makefile
28	$(dxy_subst) < $(srcdir)/hx509.din > hx509.dxy.tmp
29	chmod +x hx509.dxy.tmp
30	mv hx509.dxy.tmp hx509.dxy
31
32gssapi.dxy: gssapi.din Makefile
33	$(dxy_subst) < $(srcdir)/gssapi.din > gssapi.dxy.tmp
34	chmod +x gssapi.dxy.tmp
35	mv gssapi.dxy.tmp gssapi.dxy
36
37krb5.dxy: krb5.din Makefile
38	$(dxy_subst) < $(srcdir)/krb5.din > krb5.dxy.tmp
39	chmod +x krb5.dxy.tmp
40	mv krb5.dxy.tmp krb5.dxy
41
42ntlm.dxy: ntlm.din Makefile
43	$(dxy_subst) < $(srcdir)/ntlm.din > ntlm.dxy.tmp
44	chmod +x ntlm.dxy.tmp
45	mv ntlm.dxy.tmp ntlm.dxy
46
47wind.dxy: wind.din Makefile
48	$(dxy_subst) < $(srcdir)/wind.din > wind.dxy.tmp
49	chmod +x wind.dxy.tmp
50	mv wind.dxy.tmp wind.dxy
51
52texi_subst = sed -e 's,[@]dbdir[@],$(localstatedir),g' \
53	-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
54
55vars.texi: vars.tin Makefile
56	$(texi_subst) < $(srcdir)/vars.tin > vars.texi.tmp
57	chmod +x vars.texi.tmp
58	mv vars.texi.tmp vars.texi
59
60PROJECTS = hcrypto hdb hx509 gssapi krb5 ntlm wind
61
62doxyout doxygen: hdb.dxy hx509.dxy hcrypto.dxy gssapi.dxy krb5.dxy ntlm.dxy wind.dxy
63	@find $(srcdir)/doxyout -type d ! -perm -200 -exec chmod u+w {} ';' ; \
64	rm -rf $(srcdir)/doxyout ; \
65	mkdir $(srcdir)/doxyout ; \
66	for a in $(PROJECTS) ; do \
67		echo $$a ; \
68		doxygen $$a.dxy; \
69		(cd $(srcdir)/doxyout && find $$a/man -type f > $$a/manpages ) ; \
70	done
71
72install-data-hook: install-doxygen-manpage
73uninstall-hook: uninstall-doxygen-manpage
74dist-hook: doxygen
75
76install-doxygen-manpage:
77	for a in $(PROJECTS) ; do \
78		f="$(srcdir)/doxyout/$$a/manpages" ; \
79		test -f $$f || continue ; \
80		echo "install $$a manual pages $$(wc -l < $$f)" ; \
81		while read x ; do \
82			section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
83			$(mkinstalldirs) "$(DESTDIR)$(mandir)/man$$section" ; \
84			$(INSTALL_DATA) $(srcdir)/doxyout/$$x "$(DESTDIR)$(mandir)/man$$section" ; \
85		done < $$f ; \
86	done ; exit 0
87
88uninstall-doxygen-manpage:
89	@for a in $(PROJECTS) ; do \
90		f="$(srcdir)/doxyout/$$a/manpages" ; \
91		test -f $$f || continue ; \
92		echo "removing $$a manual pages" ; \
93		while read x ; do \
94			section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
95			base=`basename $$x` ; \
96			rm "$(DESTDIR)$(mandir)/man$$section/$$base" ; \
97		done < $$f ; \
98	done
99
100
101heimdal_TEXINFOS = \
102	ack.texi \
103	apps.texi \
104	copyright.texi \
105	heimdal.texi \
106	install.texi \
107	intro.texi \
108	kerberos4.texi \
109	migration.texi \
110	misc.texi \
111	programming.texi \
112	setup.texi \
113	vars.texi \
114	whatis.texi \
115	win2k.texi
116
117EXTRA_DIST = \
118	NTMakefile \
119	doxyout \
120	footer.html \
121	gssapi.din \
122	hdb.din \
123	hcrypto.din \
124	header.html \
125	heimdal.css \
126	hx509.din \
127	krb5.din \
128	ntlm.din \
129	init-creds \
130	latin1.tex \
131	layman.asc \
132	doxytmpl.dxy \
133	wind.din \
134	vars.tin
135
136CLEANFILES = \
137	hcrypto.dxy* \
138	hx509.dxy* \
139	hdb.dxy* \
140	gssapi.dxy* \
141	krb5.dxy* \
142	ntlm.dxy* \
143	wind.dxy* \
144	vars.texi*
145