r20945 - gnucash-docs/trunk - Patch by SASAKI Suguru - Implement mobi generation target.

Cristian Marchi cmarchi at code.gnucash.org
Fri Jul 22 13:23:03 EDT 2011


Author: cmarchi
Date: 2011-07-22 13:23:03 -0400 (Fri, 22 Jul 2011)
New Revision: 20945
Trac: http://svn.gnucash.org/trac/changeset/20945

Modified:
   gnucash-docs/trunk/Makefile.am
   gnucash-docs/trunk/README
   gnucash-docs/trunk/configure.in
   gnucash-docs/trunk/guide/C/Makefile.am
   gnucash-docs/trunk/guide/Makefile.am
   gnucash-docs/trunk/guide/de_DE/Makefile.am
   gnucash-docs/trunk/guide/it_IT/Makefile.am
   gnucash-docs/trunk/guide/ja_JP/Makefile.am
   gnucash-docs/trunk/help/C/Makefile.am
   gnucash-docs/trunk/help/Makefile.am
   gnucash-docs/trunk/help/de_DE/Makefile.am
   gnucash-docs/trunk/help/it_IT/Makefile.am
Log:
Patch by SASAKI Suguru - Implement mobi generation target.

Modified: gnucash-docs/trunk/Makefile.am
===================================================================
--- gnucash-docs/trunk/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -19,9 +19,14 @@
 distuninstallcheck_listfiles =  \
 find -regex '.*/var/scrollkeeper/.*' -prune -or -type f -print
 
+if WITH_MOBI
+  MOBI_RECURSIVE = mobi-recursive
+mobi: mobi-recursive
+endif
+
 epub: epub-recursive
 
-epub-recursive:
+epub-recursive $(MOBI_RECURSIVE):
 	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -31,7 +36,7 @@
 	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list="$(SUBDIRS)"; for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \

Modified: gnucash-docs/trunk/README
===================================================================
--- gnucash-docs/trunk/README	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/README	2011-07-22 17:23:03 UTC (rev 20945)
@@ -19,6 +19,10 @@
 
 * Apache fop  >= 0.95
 
+Additional Requirements for Generating Mobipocket:
+
+* Calibre (http://www.calibre-ebook.com/)
+
 Notes
 #####
 
@@ -49,15 +53,18 @@
 ~/gnucash-docs/html/
 ~/gnucash-docs/html/figures/
 
-* html, pdf and epub
---------------------
+* html, pdf, epub and mobi
+--------------------------
 
-You can generate the documentation in html, pdf or epub using the autotools
-based build system that comes with the sources.
+You can generate the documentation in html, pdf, epub and mobi
+using the autotools based build system that comes with the sources.
 
   cd gnucash-docs
   ./autogen.sh
+  # If you don't need mobi
   ./configure
+  # or, if you need mobi
+  ./configure --with-mobi
 
 => This will tell you if you are missing some required tools.
 
@@ -73,6 +80,11 @@
 
   make epub
 
+To generate the documentation in mobi format, instead run
+
+  make mobi
+  (Note: mobi is generated from epub, so this generates epub files as well.)
+
 If you only wish to generate a subset of the documentation, you can
 go into the directory for that subset and run the above make commands
 from there. For example to only generate the English concepts guide,
@@ -90,9 +102,13 @@
   cd guide/C
   make epub
 
+or
+
+  cd guide/C
+  make mobi
+
 depending on the output format you require.
 
-
 * XML/XSL-based tools:
 ----------------------
 

Modified: gnucash-docs/trunk/configure.in
===================================================================
--- gnucash-docs/trunk/configure.in	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/configure.in	2011-07-22 17:23:03 UTC (rev 20945)
@@ -47,6 +47,23 @@
   AC_MSG_WARN([fop not found. You will not be able to generate pdf files.])
 fi
 
+dnl
+dnl Check for mobi target and optional ebook-convert
+dnl
+AC_ARG_WITH([mobi],
+	[AC_HELP_STRING([--with-mobi],
+			[do make Mobipocket target])],,
+	with_mobi=no)
+AM_CONDITIONAL([WITH_MOBI], [test "x$with_mobi" = "xyes"])
+if test "x$with_mobi" = "xyes"; then
+  AC_PATH_PROG(EBOOK_CONVERT, ebook-convert, no)
+  if test "x$EBOOK_CONVERT" = "xno"; then
+    AC_MSG_ERROR([Couldn't find ebook-convert. Please install the Calibre package: http://www.calibre-ebook.com/])
+  fi
+else
+  AC_MSG_NOTICE([Didn't make mobi target.  If you need, specify --with-mobi])
+fi
+
 AC_OUTPUT(
 gnucash-docs.spec
 help/Makefile

Modified: gnucash-docs/trunk/guide/C/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/C/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/guide/C/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -31,4 +31,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/guide/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/guide/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -1,6 +1,10 @@
 SUBDIRS = C de_DE it_IT ja_JP
 
-epub:
+if WITH_MOBI
+  MOBI = mobi
+endif
+
+epub $(MOBI):
 	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \

Modified: gnucash-docs/trunk/guide/de_DE/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/de_DE/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/guide/de_DE/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -15,4 +15,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/guide/it_IT/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/it_IT/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/guide/it_IT/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -7,4 +7,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/guide/ja_JP/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/ja_JP/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/guide/ja_JP/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -29,4 +29,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/help/C/Makefile.am
===================================================================
--- gnucash-docs/trunk/help/C/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/help/C/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -23,4 +23,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/help/Makefile.am
===================================================================
--- gnucash-docs/trunk/help/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/help/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -1,6 +1,10 @@
 SUBDIRS = C de_DE it_IT
 
-epub:
+if WITH_MOBI
+  MOBI = mobi
+endif
+
+epub $(MOBI):
 	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \

Modified: gnucash-docs/trunk/help/de_DE/Makefile.am
===================================================================
--- gnucash-docs/trunk/help/de_DE/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/help/de_DE/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -13,4 +13,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook

Modified: gnucash-docs/trunk/help/it_IT/Makefile.am
===================================================================
--- gnucash-docs/trunk/help/it_IT/Makefile.am	2011-07-22 17:22:15 UTC (rev 20944)
+++ gnucash-docs/trunk/help/it_IT/Makefile.am	2011-07-22 17:23:03 UTC (rev 20945)
@@ -7,4 +7,7 @@
 include $(top_srcdir)/xmldocs.make
 include $(top_srcdir)/pdf.make
 include $(top_srcdir)/epub.make
+if WITH_MOBI
+include $(top_srcdir)/mobi.make
+endif
 dist-hook: app-dist-hook



More information about the gnucash-changes mailing list