bootstrap: support automake README requirement.

* gl/build-aux/bootstrap.in (func_ensure_README): New function.
Link missing README to existing alternative naming.
(require_automake_options): New functions. Fetch AM_INIT_AUTOMAKE
options from configure.ac.
(func_reconfigure): If we're using automake, and it's not in
foreign mode, link a README file if possible.
* bootstrap: Regenerate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2014-01-03 16:45:18 +13:00
parent 4357284ea9
commit 596fd58a48
2 changed files with 94 additions and 4 deletions

View File

@ -2690,6 +2690,14 @@ func_reconfigure ()
{
$debug_cmd
$require_automake_options
# Automake (without 'foreign' option) requires that README exists.
case " $automake_options " in
" foreign ") ;;
*) func_ensure_README ;;
esac
# Ensure ChangeLog presence.
if test -n "$gnulib_modules"; then
func_ifcontains "$gnulib_modules" gitlog-to-changelog \
@ -2704,7 +2712,7 @@ func_reconfigure ()
fi
# Released 'autopoint' has the tendency to install macros that have
# been obsoleted in current 'gnulib., so run this before 'gnulib-tool'.
# been obsoleted in current 'gnulib', so run this before 'gnulib-tool'.
func_autopoint
# Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
@ -3016,6 +3024,29 @@ EOT
}
# func_ensure_README
# ------------------
# Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
# completion with no README file, even though README.md or README.txt
# is often preferable.
func_ensure_changelog ()
{
$debug_cmd
test -f README || {
_G_README=
for _G_readme in README.txt README.md README.rst; do
test -f $_G_readme && break
done
test -f $_G_readme && $LN_S $_G_readme README
func_verbose "$LN_S $_G_readme README"
}
return 0
}
# func_autoreconf [SUBDIR]
# ------------------------
# Being careful not to re-run 'autopoint' or 'libtoolize', and not to
@ -3272,6 +3303,21 @@ func_require_autoheader ()
}
# require_automake_options
# ------------------------
# Extract options from AM_AUTOMAKE_INIT.
require_automake_options=func_require_automake_options
func_require_automake_options ()
{
$debug_cmd
func_extract_trace AM_INIT_AUTOMAKE
automake_options=$func_extract_trace_result
require_automake_options=:
}
# require_autopoint
# -----------------
# Skip autopoint if it's not needed.
@ -4068,7 +4114,6 @@ func_require_macro_dir ()
# require_makefile_am
# -------------------
# Ensure there is a 'Makefile.am' in the current directory.
# names an existing file.
require_makefile_am=func_require_makefile_am
func_require_makefile_am ()
{

View File

@ -356,6 +356,14 @@ func_reconfigure ()
{
$debug_cmd
$require_automake_options
# Automake (without 'foreign' option) requires that README exists.
case " $automake_options " in
" foreign ") ;;
*) func_ensure_README ;;
esac
# Ensure ChangeLog presence.
if test -n "$gnulib_modules"; then
func_ifcontains "$gnulib_modules" gitlog-to-changelog \
@ -370,7 +378,7 @@ func_reconfigure ()
fi
# Released 'autopoint' has the tendency to install macros that have
# been obsoleted in current 'gnulib., so run this before 'gnulib-tool'.
# been obsoleted in current 'gnulib', so run this before 'gnulib-tool'.
func_autopoint
# Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
@ -682,6 +690,29 @@ EOT
}
# func_ensure_README
# ------------------
# Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
# completion with no README file, even though README.md or README.txt
# is often preferable.
func_ensure_changelog ()
{
$debug_cmd
test -f README || {
_G_README=
for _G_readme in README.txt README.md README.rst; do
test -f $_G_readme && break
done
test -f $_G_readme && $LN_S $_G_readme README
func_verbose "$LN_S $_G_readme README"
}
return 0
}
# func_autoreconf [SUBDIR]
# ------------------------
# Being careful not to re-run 'autopoint' or 'libtoolize', and not to
@ -938,6 +969,21 @@ func_require_autoheader ()
}
# require_automake_options
# ------------------------
# Extract options from AM_AUTOMAKE_INIT.
require_automake_options=func_require_automake_options
func_require_automake_options ()
{
$debug_cmd
func_extract_trace AM_INIT_AUTOMAKE
automake_options=$func_extract_trace_result
require_automake_options=:
}
# require_autopoint
# -----------------
# Skip autopoint if it's not needed.
@ -1734,7 +1780,6 @@ func_require_macro_dir ()
# require_makefile_am
# -------------------
# Ensure there is a 'Makefile.am' in the current directory.
# names an existing file.
require_makefile_am=func_require_makefile_am
func_require_makefile_am ()
{