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