1233294Sstas# $Id$
255682Smarkm
355682Smarkminclude $(top_srcdir)/Makefile.am.common
455682Smarkm
5127808SnectarAUTOMAKE_OPTIONS = no-texinfo.tex
655682Smarkm
7233294SstasMAKEINFOFLAGS = --css-include=$(srcdir)/heimdal.css
8178825Sdfr
9178825SdfrTEXI2DVI = true # ARGH, make distcheck can't be disabled to not build dvifiles
10178825Sdfr
11178825Sdfrinfo_TEXINFOS = heimdal.texi hx509.texi
12178825Sdfr
13178825Sdfrdxy_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \
14178825Sdfr	-e 's,[@]objdir[@],.,g' \
15178825Sdfr	-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
16178825Sdfr
17233294Sstashcrypto.dxy: hcrypto.din Makefile
18233294Sstas	$(dxy_subst) < $(srcdir)/hcrypto.din > hcrypto.dxy.tmp
19233294Sstas	chmod +x hcrypto.dxy.tmp
20233294Sstas	mv hcrypto.dxy.tmp hcrypto.dxy
21233294Sstas
22233294Sstashdb.dxy: hdb.din Makefile
23233294Sstas	$(dxy_subst) < $(srcdir)/hdb.din > hdb.dxy.tmp
24233294Sstas	chmod +x hdb.dxy.tmp
25233294Sstas	mv hdb.dxy.tmp hdb.dxy
26233294Sstas
27233294Sstashx509.dxy: hx509.din Makefile
28233294Sstas	$(dxy_subst) < $(srcdir)/hx509.din > hx509.dxy.tmp
29233294Sstas	chmod +x hx509.dxy.tmp
30233294Sstas	mv hx509.dxy.tmp hx509.dxy
31233294Sstas
32233294Sstasgssapi.dxy: gssapi.din Makefile
33233294Sstas	$(dxy_subst) < $(srcdir)/gssapi.din > gssapi.dxy.tmp
34233294Sstas	chmod +x gssapi.dxy.tmp
35233294Sstas	mv gssapi.dxy.tmp gssapi.dxy
36233294Sstas
37178825Sdfrkrb5.dxy: krb5.din Makefile
38178825Sdfr	$(dxy_subst) < $(srcdir)/krb5.din > krb5.dxy.tmp
39178825Sdfr	chmod +x krb5.dxy.tmp
40178825Sdfr	mv krb5.dxy.tmp krb5.dxy
41178825Sdfr
42178825Sdfrntlm.dxy: ntlm.din Makefile
43178825Sdfr	$(dxy_subst) < $(srcdir)/ntlm.din > ntlm.dxy.tmp
44178825Sdfr	chmod +x ntlm.dxy.tmp
45178825Sdfr	mv ntlm.dxy.tmp ntlm.dxy
46178825Sdfr
47233294Sstaswind.dxy: wind.din Makefile
48233294Sstas	$(dxy_subst) < $(srcdir)/wind.din > wind.dxy.tmp
49233294Sstas	chmod +x wind.dxy.tmp
50233294Sstas	mv wind.dxy.tmp wind.dxy
51178825Sdfr
52178825Sdfrtexi_subst = sed -e 's,[@]dbdir[@],$(localstatedir),g' \
53178825Sdfr	-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
54178825Sdfr
55178825Sdfrvars.texi: vars.tin Makefile
56178825Sdfr	$(texi_subst) < $(srcdir)/vars.tin > vars.texi.tmp
57178825Sdfr	chmod +x vars.texi.tmp
58178825Sdfr	mv vars.texi.tmp vars.texi
59178825Sdfr
60233294SstasPROJECTS = hcrypto hdb hx509 gssapi krb5 ntlm wind 
61178825Sdfr
62233294Sstasdoxyout doxygen: hdb.dxy hx509.dxy hcrypto.dxy gssapi.dxy krb5.dxy ntlm.dxy wind.dxy
63233294Sstas	@find $(srcdir)/doxyout -type d ! -perm -200 -exec chmod u+w {} ';' ; \
64233294Sstas	rm -rf $(srcdir)/doxyout ; \
65233294Sstas	mkdir $(srcdir)/doxyout ; \
66233294Sstas	for a in $(PROJECTS) ; do \
67233294Sstas		echo $$a ; \
68233294Sstas		doxygen $$a.dxy; \
69233294Sstas		(cd $(srcdir)/doxyout && find $$a/man -type f > $$a/manpages ) ; \
70233294Sstas	done
71233294Sstas
72233294Sstasinstall-data-hook: install-doxygen-manpage
73233294Sstasuninstall-hook: uninstall-doxygen-manpage
74233294Sstasdist-hook: doxygen
75233294Sstas
76233294Sstasinstall-doxygen-manpage:
77233294Sstas	for a in $(PROJECTS) ; do \
78233294Sstas		f="$(srcdir)/doxyout/$$a/manpages" ; \
79233294Sstas		test -f $$f || continue ; \
80233294Sstas		echo "install $$a manual pages $$(wc -l < $$f)" ; \
81233294Sstas		while read x ; do \
82233294Sstas			section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
83233294Sstas			$(mkinstalldirs) "$(DESTDIR)$(mandir)/man$$section" ; \
84233294Sstas			$(INSTALL_DATA) $(srcdir)/doxyout/$$x "$(DESTDIR)$(mandir)/man$$section" ; \
85233294Sstas		done < $$f ; \
86233294Sstas	done ; exit 0
87233294Sstas
88233294Sstasuninstall-doxygen-manpage:
89233294Sstas	@for a in $(PROJECTS) ; do \
90233294Sstas		f="$(srcdir)/doxyout/$$a/manpages" ; \
91233294Sstas		test -f $$f || continue ; \
92233294Sstas		echo "removing $$a manual pages" ; \
93233294Sstas		while read x ; do \
94233294Sstas			section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \
95233294Sstas			base=`basename $$x` ; \
96233294Sstas			rm "$(DESTDIR)$(mandir)/man$$section/$$base" ; \
97233294Sstas		done < $$f ; \
98233294Sstas	done
99233294Sstas
100233294Sstas
101178825Sdfrheimdal_TEXINFOS = \
102178825Sdfr	ack.texi \
103178825Sdfr	apps.texi \
104233294Sstas	copyright.texi \
105178825Sdfr	heimdal.texi \
106178825Sdfr	install.texi \
107178825Sdfr	intro.texi \
108178825Sdfr	kerberos4.texi \
109178825Sdfr	migration.texi \
110178825Sdfr	misc.texi \
111178825Sdfr	programming.texi \
112178825Sdfr	setup.texi \
113178825Sdfr	vars.texi \
114178825Sdfr	whatis.texi \
115178825Sdfr	win2k.texi
116178825Sdfr
117178825SdfrEXTRA_DIST = \
118233294Sstas	NTMakefile \
119233294Sstas	doxyout \
120233294Sstas	footer.html \
121233294Sstas	gssapi.din \
122233294Sstas	hdb.din \
123233294Sstas	hcrypto.din \
124233294Sstas	header.html \
125233294Sstas	heimdal.css \
126233294Sstas	hx509.din \
127178825Sdfr	krb5.din \
128178825Sdfr	ntlm.din \
129178825Sdfr	init-creds \
130178825Sdfr	latin1.tex \
131178825Sdfr	layman.asc \
132178825Sdfr	doxytmpl.dxy \
133233294Sstas	wind.din \
134178825Sdfr	vars.tin
135178825Sdfr
136178825SdfrCLEANFILES = \
137233294Sstas	hcrypto.dxy* \
138233294Sstas	hx509.dxy* \
139233294Sstas	hdb.dxy* \
140233294Sstas	gssapi.dxy* \
141178825Sdfr	krb5.dxy* \
142178825Sdfr	ntlm.dxy* \
143233294Sstas	wind.dxy* \
144178825Sdfr	vars.texi*
145