summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Bielawa <tbielawa@redhat.com>2013-03-05 13:59:39 -0500
committerTim Bielawa <tbielawa@redhat.com>2013-03-05 13:59:39 -0500
commitbadb41390ed58851b6895c6d3c18e9a549b31850 (patch)
tree39af7fbe295d2a08abb295d0475d57da77867b58 /Makefile
parente2c1b34dbbb0b7219405e0ba8ed3cba632a6457e (diff)
downloadansible-badb41390ed58851b6895c6d3c18e9a549b31850.tar.gz
Update the Makefile and build-site.py to notify of missing dependencies for doc compiling
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 73f1b2e5f2..c712467348 100644
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,13 @@ OS = $(shell uname -s)
# Manpages are currently built with asciidoc -- would like to move to markdown
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
+MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1 docs/man/man1/ansible-doc.1
+ifneq ($(shell which a2x 2>/dev/null),)
ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
-MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1 docs/man/man1/ansible-doc.1
+else
+ASCII2MAN = @echo "ERROR: AsciiDoc 'a2x' command is not installed but is required to build $(MANPAGES)" && exit 1
+endif
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
@@ -186,4 +190,3 @@ webdocs:
# just for quick testing of all the module docs
webdocs2:
(cd docsite; make modules)
-