mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-23 18:05:42 +08:00
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.
This commit is contained in:
parent
b7a568ece8
commit
551bed87fa
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
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>
|
||||
|
||||
|
57
bootstrap
57
bootstrap
@ -90,17 +90,18 @@ extract_package_name='
|
||||
'
|
||||
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=
|
||||
@ -156,6 +157,32 @@ if test -n "$CVS_only_file" && test ! -r "$CVS_only_file"; then
|
||||
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() {
|
||||
@ -358,16 +385,6 @@ version_controlled_file() {
|
||||
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=
|
||||
@ -431,7 +448,7 @@ mkdir $bt $bt2 || exit
|
||||
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/\
|
||||
|
Loading…
Reference in New Issue
Block a user