• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- Makefile -*-
2
3.PHONY: gendoc api_ref asciidoc
4
5ASCIIDOCOPTS=-a pygments -a language=c -a icons \
6	     -a toc2 \
7	     -a numbered \
8	     -a imagesdir="./images/" \
9	     -a iconsdir="./images/icons" \
10	     -a stylesdir="${abs_srcdir}/stylesheets/"
11
12EXTRA_DIST = \
13	core.txt \
14	core.html \
15	route.txt \
16	route.html \
17	index.txt \
18	index.html \
19	libnl.css \
20	stylesheets \
21	images \
22	api
23
24dist-hook:
25	rm -f $(distdir)/aclocal.m4
26	rm -f $(distdir)/configure
27	rm -f $(distdir)/configure.in
28	rm -rf $(distdir)/m4
29	rm -f $(distdir)/README
30	rm -f $(distdir)/missing
31	rm -f $(distdir)/Doxyfile.in
32	rm -f $(distdir)/Makefile.am
33	rm -f $(distdir)/Makefile.in
34
35link_doc:
36if LINK_DOC
37	./gen-tags.sh > libnl.dict
38else
39	@echo "Warning: Linking to API reference is disabled, check configure output"
40endif
41
42
43%.html: %.txt link_doc
44	./resolve-asciidoc-refs.py $< > asciidoc.tmp
45	asciidoc $(ASCIIDOCOPTS) -o $@ asciidoc.tmp
46if LINK_DOC
47	./doxygen-link.py libnl.dict $@ > asciidoc.tmp
48	mv asciidoc.tmp $@
49endif
50
51asciidoc: core.html route.html index.html
52
53api_ref:
54	doxygen Doxyfile;
55
56gendoc:
57if GENERATE_DOC
58if HAVE_DOXYGEN
59	$(MAKE) api_ref
60else
61	@echo "Warning: Building of API reference (doxygen) is disabled, check autoconf logs"
62endif
63if HAVE_ASCIIDOC
64	$(MAKE) asciidoc
65else
66	@echo "Warning: Building of asciidoc files is disabled, check autoconf logs"
67endif
68else
69	@echo "Warning: Building of documentation disabled by user or autoconf"
70endif
71
72clean-local:
73	rm -f api/* libnl.dict *.html;
74