+2007-03-08 Jim Meyering <jim@meyering.net>
+
+ Make bootstrap a little more general.
+ * bootstrap (build_aux): Factor out/use this definition.
+ Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
+ (insert_sorted_if_absent): Move function definition "up", to
+ precede new first use.
+ If $build_aux/ doesn't exist initially, create it, and
+ mark it as ignored.
+
2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
Paul Eggert <eggert@cs.ucla.edu>
'
package=`sed -n "$extract_package_name" configure.ac` || exit
+build_aux=build-aux
# Extra files from gnulib, which override files from other sources.
-gnulib_extra_files='
- build-aux/install-sh
- build-aux/missing
- build-aux/mdate-sh
- build-aux/texinfo.tex
- build-aux/depcomp
- build-aux/config.guess
- build-aux/config.sub
+gnulib_extra_files="
+ $build_aux/install-sh
+ $build_aux/missing
+ $build_aux/mdate-sh
+ $build_aux/texinfo.tex
+ $build_aux/depcomp
+ $build_aux/config.guess
+ $build_aux/config.sub
doc/INSTALL
-'
+"
# Other locale categories that need message catalogs.
EXTRA_LOCALE_CATEGORIES=
exit 1
fi
+# If $STR is not already on a line by itself in $FILE, insert it,
+# sorting the new contents of the file and replacing $FILE with the result.
+insert_sorted_if_absent() {
+ file=$1
+ str=$2
+ echo "$str" | sort -u - $file | cmp -s - $file \
+ || echo "$str" | sort -u - $file -o $file \
+ || exit 1
+}
+
+# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
+grep '^[ ]*AC_CONFIG_AUX_DIR('$build_aux')' configure.ac >/dev/null ||
+ {
+ echo "$0: expected line not found in configure.ac. Add the following:" >&2
+ echo " AC_CONFIG_AUX_DIR($build_aux)" >&2.
+ }
+
+# If $build_aux doesn't exist, create it now, otherwise some bits
+# below will malfunction. If creating it, also mark it as ignored.
+if test ! -d $build_aux; then
+ mkdir $build_aux
+ for ig in .cvsignore .gitignore; do
+ test -f $ig && insert_sorted_if_absent $ig $build_aux
+ done
+fi
+
echo "$0: Bootstrapping CVS $package..."
cleanup_gnulib() {
test $found = yes
}
-# If $STR is not already on a line by itself in $FILE, insert it,
-# sorting the new contents of the file and replacing $FILE with the result.
-insert_sorted_if_absent() {
- file=$1
- str=$2
- echo "$str" | sort -u - $file | cmp -s - $file \
- || echo "$str" | sort -u - $file -o $file \
- || exit
-}
-
slurp() {
for dir in . `(cd $1 && find * -type d -print)`; do
copied=
gnulib_tool_options="\
--import\
--no-changelog\
- --aux-dir $bt/build-aux\
+ --aux-dir $bt/$build_aux\
--doc-base $bt/doc\
--lib lib$package\
--m4-base $bt/m4/\