]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Don't fail to build documentation if kindlegen doesn't exist
authorRuss Allbery <rra@stanford.edu>
Sun, 24 Jul 2011 23:20:05 +0000 (16:20 -0700)
committerDerrick Brashear <shadow@dementix.org>
Tue, 23 Aug 2011 16:36:41 +0000 (09:36 -0700)
Check for kindlegen in configure and do nothing in the MOBI build
rule if the binary didn't exist.

This is still a bit of a hack since the rule will run with every
invocation of make.  The target needs to be made conditional.  But
at least this way make all in the documentation directory doesn't
fail.

Change-Id: I57f158929b3907678b9848a60edb9765136f7dbb
Reviewed-on: http://gerrit.openafs.org/5090
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
acinclude.m4
doc/xml/AdminGuide/Makefile.in
doc/xml/QuickStartUnix/Makefile.in
doc/xml/UserGuide/Makefile.in

index eea7df8630ca641b98f6f6b00ae48c36cd6aa0db..05ab22f61a70636cc9eb60a03b91d4f5b3ab4c74 100644 (file)
@@ -259,6 +259,10 @@ AC_ARG_WITH([docbook-stylesheets],
 
 enable_login="no"
 
+dnl Check whether kindlegen exists.  If not, we'll suppress that part of the
+dnl documentation build.
+AC_CHECK_PROGS([KINDLEGEN], [kindlegen])
+
 dnl weird ass systems
 dnl AC_AIX
 AC_ISC_POSIX
index 8bcc3322ab11492fb1c97b9d26bd291b309764a9..b60c80a6b8d068d9e33f4c029b49a39fb5572292 100644 (file)
@@ -50,7 +50,9 @@ $(BOOK).epub: $(SRCS)
        fi
 
 $(BOOK).mobi: $(BOOK).epub
-       kindlegen $(BOOK).epub -o $(BOOK).mobi
+       if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
+               kindlegen $(BOOK).epub -o $(BOOK).mobi; \
+       fi
 
 check:
        xmllint --noout --valid $(BOOK).xml
index 594bc6cc2d077a109b635eceada581e06d742085..b40a9b973d40883b544b3cf88abe9f1c32ebe8ed 100644 (file)
@@ -48,7 +48,9 @@ $(BOOK).epub: $(SRCS)
        fi
 
 $(BOOK).mobi: $(BOOK).epub
-       kindlegen $(BOOK).epub -o $(BOOK).mobi
+       if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
+               kindlegen $(BOOK).epub -o $(BOOK).mobi; \
+       fi
 
 check:
        xmllint --noout --valid $(BOOK).xml
index 42e40532a48c07859653ce0753208204b6e369a0..aeb28abf5a2f3ce0779ba9e0948d7e3c7520d065 100644 (file)
@@ -47,7 +47,9 @@ $(BOOK).epub: $(SRCS)
        fi
 
 $(BOOK).mobi: $(BOOK).epub
-       kindlegen $(BOOK).epub -o $(BOOK).mobi
+       if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
+               kindlegen $(BOOK).epub -o $(BOOK).mobi; \
+       fi
 
 check:
        xmllint --noout --valid $(BOOK).xml