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

[Xen-changelog] [xen master] docs: make 'gmake dist-docs' work



commit 2569c54743c887ec6fbbba74efe56fb113b933fc
Author:     Christoph Egger <chegger@xxxxxxxxx>
AuthorDate: Fri May 10 16:07:44 2013 +0200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon May 13 10:53:37 2013 +0100

    docs: make 'gmake dist-docs' work
    
    doc: buildsystem fixes
    
    - use correct pathes (make gmake dist-docs from toplevel directory work)
    - configure detects perl as tools/configure does
    
    Signed-off-by: Christoph Egger <chegger@xxxxxxxxx>
    Reviewed-by: Matthew Wilson <msw@xxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    [ ijc -- reran autogen.sh ]
---
 config/Docs.mk.in |    1 +
 docs/Makefile     |   14 +++++-------
 docs/configure    |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 docs/configure.ac |    4 +++
 4 files changed, 64 insertions(+), 9 deletions(-)

diff --git a/config/Docs.mk.in b/config/Docs.mk.in
index 024ef20..a2a72fd 100644
--- a/config/Docs.mk.in
+++ b/config/Docs.mk.in
@@ -11,3 +11,4 @@ POD2MAN             := @POD2MAN@
 POD2HTML            := @POD2HTML@
 POD2TEXT            := @POD2TEXT@
 MARKDOWN            := @MARKDOWN@
+PERL                := @PERL@
diff --git a/docs/Makefile b/docs/Makefile
index b26738c..72bd5e4 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,5 +1,3 @@
-#!/usr/bin/make -f
-
 XEN_ROOT=$(CURDIR)/..
 include $(XEN_ROOT)/Config.mk
 -include $(XEN_ROOT)/config/Docs.mk
@@ -75,7 +73,7 @@ clean:
 
 .PHONY: distclean
 distclean: clean
-       rm -rf ../config/Docs.mk config.log config.status config.cache \
+       rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache 
\
                autom4te.cache
 
 .PHONY: install
@@ -88,8 +86,8 @@ install: all
        cp -R man5 $(DESTDIR)$(MANDIR)
        [ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR)
 
-html/index.html: $(DOC_HTML) ./gen-html-index INDEX
-       perl -w -- ./gen-html-index -i INDEX html $(DOC_HTML)
+html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX
+       $(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML)
 
 html/%.html: %.markdown
        $(INSTALL_DIR) $(@D)
@@ -123,13 +121,13 @@ else
        @echo "pod2html not installed; skipping $<."
 endif
 
-html/hypercall/index.html: ./xen-headers
+html/hypercall/index.html: $(CURDIR)/xen-headers
        rm -rf $(@D)
        $(INSTALL_DIR) $(@D)
-       ./xen-headers -O $(@D) \
+       $(PERL) -w $(CURDIR)/xen-headers -O $(@D) \
                -T 'arch-x86_64 - Xen public headers' \
                -X arch-x86_32 -X xen-x86_32 -X arch-arm \
-               ../xen include/public include/xen/errno.h
+               $(XEN_ROOT)/xen include/public include/xen/errno.h
 
 -include html/hypercall/.deps
 
diff --git a/docs/configure b/docs/configure
index d623d19..a778bda 100755
--- a/docs/configure
+++ b/docs/configure
@@ -559,6 +559,7 @@ PACKAGE_URL='http://www.xen.org/'
 ac_unique_file="misc/xen-command-line.markdown"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+PERL
 MARKDOWN
 POD2TEXT
 POD2HTML
@@ -613,7 +614,8 @@ FIG2DEV
 POD2MAN
 POD2HTML
 POD2TEXT
-MARKDOWN'
+MARKDOWN
+PERL'
 
 
 # Initialize some variables set by options.
@@ -1227,6 +1229,7 @@ Some influential environment variables:
   POD2HTML    Path to pod2html tool
   POD2TEXT    Path to pod2text tool
   MARKDOWN    Path to markdown tool
+  PERL        Path to Perl parser
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1701,6 +1704,8 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please 
don't use this var.
 
 
 
+
+
     # Extract the first word of "fig2dev", so it can be a program name with 
args.
 set dummy fig2dev; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1950,6 +1955,53 @@ $as_echo "$as_me: WARNING: markdown is not available so 
some documentation won't
 fi
 
 
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PERL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${PERL}" = x"no"
+then
+    as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
+fi
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
diff --git a/docs/configure.ac b/docs/configure.ac
index ea0552e..f0ebf00 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -10,6 +10,7 @@ AC_CONFIG_AUX_DIR([../])
 
 # M4 Macro includes
 m4_include([../m4/docs_tool.m4])
+m4_include([../m4/path_or_fail.m4])
 
 AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev])
 AX_DOCS_TOOL_PROG([POD2MAN], [pod2man])
@@ -17,4 +18,7 @@ AX_DOCS_TOOL_PROG([POD2HTML], [pod2html])
 AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
 AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py])
 
+AC_ARG_VAR([PERL], [Path to Perl parser])
+AX_PATH_PROG_OR_FAIL([PERL], [perl])
+
 AC_OUTPUT()
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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