summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-05-09 10:06:24 +0200
committerThomas Graf <tgraf@redhat.com>2012-05-09 10:06:24 +0200
commit183e86913aab58acf7b5b9cd160518e527bb0348 (patch)
tree055a65b00554aafbe242ce373869e619b83fe489 /doc/Makefile.am
parent7b503a12a039aeb129fb75804824f6b365adb54b (diff)
downloadlibnl-183e86913aab58acf7b5b9cd160518e527bb0348.tar.gz
doc: Check documentation generation requirements with autoconf
Adds --enable-doc/--disable-doc, if omitted doc will only be build if requirements are met. If explicitely enabled, configure script will fail if requirements are not met.
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am25
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6f574ddd..142dc31b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -79,20 +79,43 @@ EXTRA_DIST = \
images/icons/callouts/15.png
%.html: %.txt
+if LINK_DOC
./resolve-asciidoc-refs.py $< > asciidoc.tmp
asciidoc $(ASCIIDOCOPTS) -o $@ asciidoc.tmp
./doxygen-link.py libnl.dict $@ > asciidoc.tmp
mv asciidoc.tmp $@
+else
+ asciidoc $(ASCIIDOCOPTS) -o $@ $<
+endif
asciidoc: core.html route.html index.html
+link_doc:
+if LINK_DOC
+ ./gen-tags.sh | ./tags2dict.sh > libnl.dict
+else
+ @echo "Warning: Linking to API reference is disabled, check configure output"
+endif
+
api_ref:
doxygen Doxyfile;
- ./gen-tags.sh | ./tags2dict.sh > libnl.dict
+ $(MAKE) link_doc
gendoc:
+if GENERATE_DOC
+if HAVE_DOXYGEN
$(MAKE) api_ref
+else
+ @echo "Warning: Building of API reference (doxygen) is disabled, check autoconf logs"
+endif
+if HAVE_ASCIIDOC
$(MAKE) asciidoc
+else
+ @echo "Warning: Building of asciidoc files is disabled, check autoconf logs"
+endif
+else
+ @echo "Warning: Building of documentation disabled by user or autoconf"
+endif
clean-local:
rm -f api/* libnl.dict *.html;