From 2d744d9edab9819e15942d20e2f11fad14d8cbbb Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Sun, 15 Sep 2013 20:35:15 +0700 Subject: [PATCH] bootstrap: make ensure_changelog work for update mode projects. * gl/build-aux/bootstrap.in (func_bootstrap): Move func_changelog_ensure invocation from here... (func_reconfigure): ...to here. If gnulib_modules is empty, then grep gnulib-cache.m4 for gitlog-to-changelog before invoking func_changelog_ensure. * bootstrap: Regenerate. Signed-off-by: Gary V. Vaughan --- bootstrap | 17 +++++++++++++---- gl/build-aux/bootstrap.in | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/bootstrap b/bootstrap index e123a8b7c..803380a08 100755 --- a/bootstrap +++ b/bootstrap @@ -2461,10 +2461,6 @@ func_bootstrap () # Post-option preparation. func_prep - # Ensure ChangeLog presence. - func_ifcontains "$gnulib_modules" gitlog-to-changelog \ - func_ensure_changelog - # Reconfigure the package. func_reconfigure @@ -2545,6 +2541,19 @@ func_reconfigure () { $debug_cmd + # Ensure ChangeLog presence. + if test -n "$gnulib_modules"; then + func_ifcontains "$gnulib_modules" gitlog-to-changelog \ + func_ensure_changelog + else + $require_gnulib_cache + if sed -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache | + func_grep_q gitlog-to-changelog + then + func_ensure_changelog + fi + fi + # Released 'autopoint' has the tendency to install macros that have # been obsoleted in current 'gnulib., so run this before 'gnulib-tool'. func_autopoint diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in index e58cde5da..550a64293 100755 --- a/gl/build-aux/bootstrap.in +++ b/gl/build-aux/bootstrap.in @@ -271,10 +271,6 @@ func_bootstrap () # Post-option preparation. func_prep - # Ensure ChangeLog presence. - func_ifcontains "$gnulib_modules" gitlog-to-changelog \ - func_ensure_changelog - # Reconfigure the package. func_reconfigure @@ -355,6 +351,19 @@ func_reconfigure () { $debug_cmd + # Ensure ChangeLog presence. + if test -n "$gnulib_modules"; then + func_ifcontains "$gnulib_modules" gitlog-to-changelog \ + func_ensure_changelog + else + $require_gnulib_cache + if sed -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache | + func_grep_q gitlog-to-changelog + then + func_ensure_changelog + fi + fi + # Released 'autopoint' has the tendency to install macros that have # been obsoleted in current 'gnulib., so run this before 'gnulib-tool'. func_autopoint -- 2.47.3