Home | History | Annotate | Download | only in doc
      1 # -*- Makefile -*-
      2 
      3 .PHONY: gendoc api_ref asciidoc
      4 
      5 ASCIIDOCOPTS=-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 
     12 EXTRA_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 
     24 dist-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 
     35 link_doc:
     36 if LINK_DOC
     37 	./gen-tags.sh > libnl.dict
     38 else
     39 	@echo "Warning: Linking to API reference is disabled, check configure output"
     40 endif
     41 	
     42 
     43 %.html: %.txt link_doc
     44 	./resolve-asciidoc-refs.py $< > asciidoc.tmp
     45 	asciidoc $(ASCIIDOCOPTS) -o $@ asciidoc.tmp
     46 if LINK_DOC
     47 	./doxygen-link.py libnl.dict $@ > asciidoc.tmp
     48 	mv asciidoc.tmp $@
     49 endif
     50 
     51 asciidoc: core.html route.html index.html
     52 
     53 api_ref:
     54 	doxygen Doxyfile;
     55 
     56 gendoc:
     57 if GENERATE_DOC
     58 if HAVE_DOXYGEN
     59 	$(MAKE) api_ref
     60 else
     61 	@echo "Warning: Building of API reference (doxygen) is disabled, check autoconf logs"
     62 endif
     63 if HAVE_ASCIIDOC
     64 	$(MAKE) asciidoc
     65 else
     66 	@echo "Warning: Building of asciidoc files is disabled, check autoconf logs"
     67 endif
     68 else
     69 	@echo "Warning: Building of documentation disabled by user or autoconf"
     70 endif
     71 
     72 clean-local:
     73 	rm -f api/* libnl.dict *.html;
     74