From 2569c54743c887ec6fbbba74efe56fb113b933fc Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Fri, 10 May 2013 16:07:44 +0200 Subject: 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 Reviewed-by: Matthew Wilson Acked-by: Ian Campbell [ ijc -- reran autogen.sh ] --- docs/Makefile | 14 ++++++-------- docs/configure | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- docs/configure.ac | 4 ++++ 3 files changed, 63 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index b26738c961..72bd5e46ea 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 d623d19446..a778bda09a 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 ea0552e43d..f0ebf00fa7 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() -- cgit v1.2.3