Updating branch refs/heads/master to 7d85dae9cbd88e40fe987dc97e9453932e09b2ca (commit) from ddc1f35ba246fea94eea293a8f530de95aa0253e (commit)
commit 7d85dae9cbd88e40fe987dc97e9453932e09b2ca Author: Nick Schermer <n...@xfce.org> Date: Sun Oct 31 12:09:20 2010 +0100 Add check stage for documentation submodules. This adds an extra check when XDT_AUTOGEN_CHECK_DOCS is defined. This variable points to the directory that should contain the xfce4-docs submodule. If no submodule clone if found and autogen.sh is running from within a git clone, it will automatically initialize the submodule for the user, if not it will show an error and abort xdt-autogen, since configure will abort too if we continue because of missing makefile.am files. configure.in.in | 2 +- scripts/xdt-autogen.in.in | 42 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/configure.in.in b/configure.in.in index 8e3b48a..c8af429 100644 --- a/configure.in.in +++ b/configure.in.in @@ -11,7 +11,7 @@ dnl *** Version information *** dnl *************************** m4_define([xdt_version_major], [4]) m4_define([xdt_version_minor], [7]) -m4_define([xdt_version_micro], [2]) +m4_define([xdt_version_micro], [3]) m4_define([xdt_version_nano], []) m4_define([xdt_version_build], [...@revision@]) m4_define([xdt_version_tag], []) diff --git a/scripts/xdt-autogen.in.in b/scripts/xdt-autogen.in.in index 2d14ef8..c7892b6 100644 --- a/scripts/xdt-autogen.in.in +++ b/scripts/xdt-autogen.in.in @@ -197,8 +197,11 @@ do_version_check() { } if ! do_version_check; then - echo "This version of xdt-autogen ($VERSION) is too old. Version" >&2 - echo "$XDT_AUTOGEN_REQUIRED_VERSION or greater is required." >&2 + cat >&2 <<EOF +xdt-autogen: This version of xdt-autogen ($VERSION) is too old. + Version $XDT_AUTOGEN_REQUIRED_VERSION or greater is required. +EOF + exit 1 fi @@ -215,6 +218,41 @@ export XDG_DATA_DIRS XDG_DATA_HOME MASTER_DIR=`pwd`; test -z "${MASTER_DIR}" && MASTER_DIR="." ## +## Check for documentation submodule +## +if test -n "$XDT_AUTOGEN_CHECK_DOCS"; then + if test ! -f "$MASTER_DIR/$XDT_AUTOGEN_CHECK_DOCS/Makefile.am"; then + # Check for git and needed files, if found, automatically + # update the submodule + if test -d .git -a -f .gitmodules; then + echo "xdt-autogen: Automaticcaly initializing the $XDT_AUTOGEN_CHECK_DOCS submodule." + + # Run git command to get the lastest docs revision + res=0 && git submodule sync $XDT_AUTOGEN_CHECK_DOCS && \ + git submodule update --init $XDT_AUTOGEN_CHECK_DOCS && res=1 + + if test $res -eq 0; then + cat >&2 <<EOF +xdt-autogen: Pulling the xfce4-docs git submodule failed. See errors + above for more information and take a look at + http://wiki.xfce.org/documentation. +EOF + exit 1 + fi + else + cat >&2 <<EOF +xdt-autogen: The directory $XDT_AUTOGEN_CHECK_DOCS does not contain + the required files to run configure. See + http://wiki.xfce.org/documentation for more information. +EOF + exit 1 + fi + #else + # We could warn about out-of-date submodules here. + fi +fi + +## ## First we do some substitutions to generate configure.{ac,in} if necessary ## CONFIGURE_AC_IN_FILES=`lookup_configure_ac_in_files "$MASTER_DIR"` _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits