diff options
author | Gary V. Vaughan <gary@gnu.org> | 2014-01-03 16:45:18 +1300 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2014-01-03 16:48:46 +1300 |
commit | 596fd58a484133a433a3fb941ffeaf9c815ac6d8 (patch) | |
tree | 3cbe426c0d372bf07f7cb1848d7c62e2d7bf9b0c | |
parent | 4357284ea9899cb50176b75baaeba9ee74687efa (diff) | |
download | libtool-596fd58a484133a433a3fb941ffeaf9c815ac6d8.tar.gz |
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>
-rwxr-xr-x | bootstrap | 49 | ||||
-rwxr-xr-x | gl/build-aux/bootstrap.in | 49 |
2 files changed, 94 insertions, 4 deletions
@@ -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 () { diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in index 93f1c25d..d596c847 100755 --- a/gl/build-aux/bootstrap.in +++ b/gl/build-aux/bootstrap.in @@ -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 () { |