summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBenedikt Meurer <benedikt.meurer@googlemail.com>2010-12-19 12:01:53 +0100
committerBenedikt Meurer <benedikt.meurer@googlemail.com>2010-12-19 12:01:53 +0100
commitd1702a893ff5f2c0fdf3cb0779360d155004efb1 (patch)
treec425ea18ef8591475b842a911be5888a69305cdb /scripts
parent4dc82ec2af7cab940cd700be6cb041468dc86338 (diff)
parent56cc7a69d75dd7d59d0170af16b5030189ccb1a0 (diff)
downloadxfce4-dev-tools-d1702a893ff5f2c0fdf3cb0779360d155004efb1.tar.gz
Merge remote branch 'origin'
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xdt-autogen.in.in48
1 files changed, 43 insertions, 5 deletions
diff --git a/scripts/xdt-autogen.in.in b/scripts/xdt-autogen.in.in
index a2ef933..3a128e4 100644
--- a/scripts/xdt-autogen.in.in
+++ b/scripts/xdt-autogen.in.in
@@ -70,7 +70,7 @@ fi
##
parse_configure_subdirs()
{
- cat "$1" | tr '\\n\\t\\\\' ' ' | sed -ne 's|.*AC_CONFIG_SUBDIRS(\[\{0,1\}\([[:alnum:]_ @/-]\{1,\}\).*|\1|p'
+ test -f "$1" && cat "$1" | tr '\\n\\t\\\\' ' ' | sed -ne 's|.*AC_CONFIG_SUBDIRS(\[\{0,1\}\([[:alnum:]_ @/-]\{1,\}\).*|\1|p'
}
##
@@ -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: Automatically 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"`
@@ -429,7 +467,7 @@ done
## simply aclocal.
##
test -z "${XDT_PROG_ACLOCAL}" &&
-for i in aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal; do
+for i in aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal-1.8 aclocal; do
(${i} --version) </dev/null >/dev/null 2>&1 &&
XDT_PROG_ACLOCAL=${i} && break
done
@@ -473,7 +511,7 @@ done
## simply automake.
##
test -z "${XDT_PROG_AUTOMAKE}" &&
-for i in automake-1.10 automake-1.9 automake-1.8 automake; do
+for i in automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake; do
(${i} --version) </dev/null >/dev/null 2>&1 &&
XDT_PROG_AUTOMAKE=${i} && break
done