Add asciidoc checks in the documentation makefile

Exit with error if the asciidoc executable is not available or
has version lower than 8.6.3

Change-Id: I953a65304d850dddd83f4c18e0254290ead8cf0f
This commit is contained in:
David Pursehouse 2013-02-19 18:05:29 +09:00
parent 1a41273e24
commit 6d97b5504a

View File

@ -14,6 +14,7 @@
ASCIIDOC ?= asciidoc
ASCIIDOC_EXTRA ?=
ASCIIDOC_VER ?= 8.6.3
SVN ?= svn
PUB_ROOT ?= https://gerrit-documentation.googlecode.com/svn/Documentation
@ -23,6 +24,16 @@ clean:
rm -f *.html
rm -rf $(LOCAL_ROOT)
ASCIIDOC_EXE := $(shell which $(ASCIIDOC))
ifeq ($(wildcard $(ASCIIDOC_EXE)),)
$(error $(ASCIIDOC) must be available)
else
ASCIIDOC_OK := $(shell expr `asciidoc --version | cut -f2 -d' '` \>= $(ASCIIDOC_VER))
ifeq ($(ASCIIDOC_OK),0)
$(error $(ASCIIDOC) version $(ASCIIDOC_VER) or higher is required)
endif
endif
ifeq ($(origin VERSION), undefined)
VERSION := $(shell ./GEN-DOC-VERSION 2>/dev/null)
endif