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>
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
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
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
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