From a0521b0449635f64694093d08b98ab7d67a28bf4 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 22 Feb 2010 10:59:33 -0700 Subject: [PATCH 1/3] bootstrap: allow for alternate submodule location Libvirt sets submodule.gnulib.path to ".gnulib". Also, it does not need gnulib.mk, but directly uses Makefile.am. * build-aux/bootstrap (gnulib_path): New variable; use instead of hardcoding submodule location. (gnulib_mk): Allow direct use of Makefile.am. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ build-aux/bootstrap | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 916b311..2056add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-22 Eric Blake + bootstrap: allow for alternate submodule location + * build-aux/bootstrap (gnulib_path): New variable; use instead of + hardcoding submodule location. + (gnulib_mk): Allow direct use of Makefile.am. + bootstrap: use GNULIB_SRCDIR to reduce disk usage * build-aux/bootstrap (GNULIB_SRCDIR): If set, use as a reference, rather than reconfiguring where the submodule points. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 1595d1b..4b947eb 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -390,7 +390,7 @@ fi cleanup_gnulib() { status=$? - rm -fr gnulib + rm -fr "$gnulib_path" exit $status } @@ -398,6 +398,8 @@ git_modules_config () { test -f .gitmodules && git config --file .gitmodules "$@" } +gnulib_path=`git_modules_config submodule.gnulib.path` + # Get gnulib files. case ${GNULIB_SRCDIR--} in @@ -407,26 +409,27 @@ case ${GNULIB_SRCDIR--} in git submodule init || exit $? git submodule update || exit $? - elif [ ! -d gnulib ]; then + elif [ ! -d "$gnulib_path" ]; then echo "$0: getting gnulib files..." trap cleanup_gnulib 1 2 13 15 git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= - git clone $shallow git://git.sv.gnu.org/gnulib || + git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || cleanup_gnulib trap - 1 2 13 15 fi - GNULIB_SRCDIR=gnulib + GNULIB_SRCDIR=$gnulib_path ;; *) # Use GNULIB_SRCDIR as a reference. Assumes git 1.6.4 or newer. if test -d "$GNULIB_SRCDIR"/.git && \ git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." - git submodule update --init --reference "$GNULIB_SRCDIR" gnulib || exit $? - GNULIB_SRCDIR=gnulib + git submodule update --init --reference "$GNULIB_SRCDIR" \ + "$gnulib_path" || exit $? + GNULIB_SRCDIR=$gnulib_path fi ;; esac @@ -632,7 +635,7 @@ slurp() { for excluded_file in $excluded_files; do test "$dir/$file" = "$excluded_file" && continue 2 done - if test $file = Makefile.am; then + if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then copied=$copied${sep}$gnulib_mk; sep=$nl remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g" sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || { -- 1.6.6.1 From 03cdd8b88ef8f0c8ca0992c76fa1c24d851d2e88 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 22 Feb 2010 12:13:22 -0700 Subject: [PATCH 2/3] bootstrap: interoperate with gettext 0.14.1 Without this patch, the modified gettext.m4 aborts autoconf due to an unterminated m4 string. * build-aux/bootstrap (slurp): Fix typo when using older gettext. Signed-off-by: Eric Blake --- ChangeLog | 3 +++ build-aux/bootstrap | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2056add..2c6dfec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-02-22 Eric Blake + bootstrap: interoperate with gettext 0.14.1 + * build-aux/bootstrap (slurp): Fix typo when using older gettext. + bootstrap: allow for alternate submodule location * build-aux/bootstrap (gnulib_path): New variable; use instead of hardcoding submodule location. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 4b947eb..d37567c 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -653,7 +653,7 @@ slurp() { rm -f $dir/$file sed ' /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\ - AC_DEFUN([AM_INTL_SUBDIR], [ + AC_DEFUN([AM_INTL_SUBDIR], []) /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\ AC_DEFUN([gt_INTL_SUBDIR_CORE], []) $a\ -- 1.6.6.1 From f106bd1699710efa368f2ee018b4b4d8ff30241c Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 22 Feb 2010 15:28:38 -0700 Subject: [PATCH 3/3] bootstrap: support non-FSF copyright holder Allow non-FSF projects, like libvirt, to make full use of bootstrap. * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow bootstrap.conf override of COPYRIGHT_HOLDER. (MSGID_BUGS_ADDRESS): Allow URL rather than email. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ build-aux/bootstrap | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c6dfec..ddb7216 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-22 Eric Blake + bootstrap: support non-FSF copyright holder + * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow + bootstrap.conf override of COPYRIGHT_HOLDER. + (MSGID_BUGS_ADDRESS): Allow URL rather than email. + bootstrap: interoperate with gettext 0.14.1 * build-aux/bootstrap (slurp): Fix typo when using older gettext. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index d37567c..be96444 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -133,7 +133,8 @@ XGETTEXT_OPTIONS='\\\ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ ' -# Package bug report address for gettext files +# Package bug report address and copyright holder for gettext files +COPYRIGHT_HOLDER='Free Software Foundation, Inc.' address@hidden # Files we don't want to import. @@ -786,7 +787,8 @@ if test $with_gettext = yes; then rm -f po/Makevars sed ' /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/ + /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ + /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ -- 1.6.6.1