[CRIU] [PATCH] Doc/Makefile: error out if req tools absent

Kir Kolyshkin kir at openvz.org
Sun Jan 19 12:31:28 PST 2014


Make sure we have a clear message why build it failing, as there are
repeated questions at criu@ mailing list.

Before this patch:

	[kir at kirpad Documentation]$ make
	  GEN      criu.8
	make: *** [criu.8] Error 127

After:

	[kir at kirpad Documentation]$ make
	/bin/sh: line 1: xmltos: command not found
	make: *** [check] Error 1

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Documentation/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 0a1edac..7f0fe09 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -8,7 +8,13 @@ SRC		+= criu.txt
 MANS		:= $(patsubst %.txt,%.8,$(SRC))
 MAN8DIR		:= $(MANDIR)/man8
 
-all: $(MANS)
+all: check $(MANS)
+
+check:
+	$(Q) for B in $(ASCIIDOC) $(A2X) $(XMLTO); do \
+		$$B --version > /dev/null || exit 1; \
+	done
+.PHONY: check
 
 %.8: %.txt
 	$(E) "  GEN     " $@
-- 
1.8.1.4



More information about the CRIU mailing list