[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 3] tools: check for documentation generation tools at configure time



It is sometimes hard to discover all the optional documentation
generation tools that should be on a system to build all available Xen
documentation. By checking for documentation generation tools at
./configure time and displaying a warning, Xen packagers will more
easily learn about new optional build dependencies, like markdown,
when they are introduced.

Signed-off-by: Matt Wilson <msw@xxxxxxxxxx>

diff -r d7e4efa17fb0 -r 674b694814c8 README
--- a/README    Tue Aug 28 15:35:08 2012 -0700
+++ b/README    Wed Aug 29 11:07:52 2012 -0700
@@ -28,8 +28,10 @@
 your system. For full documentation, see the Xen User Manual. If this
 is a pre-built release then you can find the manual at:
  dist/install/usr/share/doc/xen/pdf/user.pdf
-If you have a source release, then 'make -C docs' will build the
-manual at docs/pdf/user.pdf.
+If you have a source release and the required documentation generation
+tools, then 'make -C docs' will build the manual at docs/pdf/user.pdf.
+Running ./configure will check for the full suite of documentation
+tools and will display a warning if missing tools are detected.
 
 Quick-Start Guide
 =================
@@ -59,7 +61,6 @@
     * GNU gettext
     * 16-bit x86 assembler, loader and compiler (dev86 rpm or bin86 & bcc debs)
     * ACPI ASL compiler (iasl)
-    * markdown
 
 In addition to the above there are a number of optional build
 prerequisites. Omitting these will cause the related features to be
@@ -67,6 +68,7 @@
     * Development install of Ocaml (e.g. ocaml-nox and
       ocaml-findlib). Required to build ocaml components which
       includes the alternative ocaml xenstored.
+    * markdown
 
 Second, you need to acquire a suitable kernel for use in domain 0. If
 possible you should use a kernel provided by your OS distributor. If
diff -r d7e4efa17fb0 -r 674b694814c8 config/Tools.mk.in
--- a/config/Tools.mk.in        Tue Aug 28 15:35:08 2012 -0700
+++ b/config/Tools.mk.in        Wed Aug 29 11:07:52 2012 -0700
@@ -22,6 +22,17 @@
 LD86                := @LD86@
 BCC                 := @BCC@
 IASL                := @IASL@
+PS2PDF              := @PS2PDF@
+DVIPS               := @DVIPS@
+LATEX               := @LATEX@
+FIG2DEV             := @FIG2DEV@
+LATEX2HTML          := @LATEX2HTML@
+DOXYGEN             := @DOXYGEN@
+POD2MAN             := @POD2MAN@
+POD2TEXT            := @POD2TEXT@
+DOT                 := @DOT@
+NEATO               := @NEATO@
+MARKDOWN            := @MARKDOWN@
 
 # Extra folder for libs/includes
 PREPEND_INCLUDES    := @PREPEND_INCLUDES@
diff -r d7e4efa17fb0 -r 674b694814c8 docs/Makefile
--- a/docs/Makefile     Tue Aug 28 15:35:08 2012 -0700
+++ b/docs/Makefile     Wed Aug 29 11:07:52 2012 -0700
@@ -3,6 +3,11 @@
 XEN_ROOT=$(CURDIR)/..
 include $(XEN_ROOT)/Config.mk
 include $(XEN_ROOT)/docs/Docs.mk
+# The default documentation tools specified in Docs.mk can be
+# persistently overridden by the user via ./configure, but running
+# ./configure is not required to build the docs tree. Thus Tools.mk is
+# optionally included.
+-include $(XEN_ROOT)/config/Tools.mk
 
 VERSION                = xen-unstable
 
diff -r d7e4efa17fb0 -r 674b694814c8 tools/configure.ac
--- a/tools/configure.ac        Tue Aug 28 15:35:08 2012 -0700
+++ b/tools/configure.ac        Wed Aug 29 11:07:52 2012 -0700
@@ -34,6 +34,7 @@
 m4_include([m4/curses.m4])
 m4_include([m4/pthread.m4])
 m4_include([m4/ptyfuncs.m4])
+m4_include([m4/docs_tool.m4])
 
 # Enable/disable options
 AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
@@ -80,6 +81,17 @@
 AC_PATH_PROG([BISON], [bison])
 AC_PATH_PROG([FLEX], [flex])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
+AX_DOCS_TOOL_PROG([PS2PDF], [ps2pdf])
+AX_DOCS_TOOL_PROG([DVIPS], [dvips])
+AX_DOCS_TOOL_PROG([LATEX], [latex])
+AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev])
+AX_DOCS_TOOL_PROG([LATEX2HTML], [latex2html])
+AX_DOCS_TOOL_PROG([DOXYGEN], [doxygen])
+AX_DOCS_TOOL_PROG([POD2MAN], [pod2man])
+AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
+AX_DOCS_TOOL_PROG([DOT], [dot])
+AX_DOCS_TOOL_PROG([NEATO], [neato])
+AX_DOCS_TOOL_PROG([MARKDOWN], [markdown])
 AS_IF([test "x$xapi" = "xy"], [
     AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
     AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
diff -r d7e4efa17fb0 -r 674b694814c8 tools/m4/docs_tool.m4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/m4/docs_tool.m4     Wed Aug 29 11:07:52 2012 -0700
@@ -0,0 +1,8 @@
+AC_DEFUN([AX_DOCS_TOOL_PROG], [
+dnl
+    AC_ARG_VAR([$1], [Path to $2 tool])
+    AC_PATH_PROG([$1], [$2])
+    AS_IF([! test -x "$ac_cv_path_$1"], [
+        AC_MSG_WARN([$2 is not available so some documentation won't be built])
+    ])
+])

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.