* automake.in (preprocess_file): Turn the '%CK-NEWS%' transform into ... (generate_makefile): ... the '$(am.conf.check-news)' internal variable. * lib/am/distdir.am (distdir): Adjust accordingly.
Signed-off-by: Stefano Lattarini <[email protected]> --- automake.in | 3 ++- lib/am/distdir.am | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/automake.in b/automake.in index 59cb29e..4ca0525 100644 --- a/automake.in +++ b/automake.in @@ -5679,7 +5679,6 @@ sub preprocess_file ($%) %transform = ( 'INSTALL-INFO' => ! option 'no-installinfo', 'INSTALL-MAN' => ! option 'no-installman', 'HAVE-MANS' => !! var ('MANS'), - 'CK-NEWS' => !! option 'check-news', 'SUBDIRS' => !! var ('SUBDIRS'), 'TOPDIR_P' => $relative_dir eq '.', @@ -6685,6 +6684,8 @@ sub generate_makefile ($$) define_variable ('subdir', INTERNAL, $relative_dir); define_variable ('am.conf.is-topdir', INTERNAL, $relative_dir eq '.' ? "yes" : ""); + define_variable ('am.conf.check-news', INTERNAL, + option 'check-news' ? "yes" : ""); define_variable ('am.conf.aux-dir', INTERNAL, $am_config_aux_dir); define_variable ('am.relpath.makefile', INTERNAL, basename ($makefile)); define_variable ('am.relpath.makefile.am', INTERNAL, diff --git a/lib/am/distdir.am b/lib/am/distdir.am index b38116b..239422d 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -159,14 +159,13 @@ distdir: $(am.dist.all-files) | $(am.dir) ## in case some explanatory text is desirable. ## if %?TOPDIR_P% -if %?CK-NEWS% - @case `sed 15q $(srcdir)/NEWS` in \ - *"$(VERSION)"*) : ;; \ - *) \ + @$(if $(am.conf.check-news), \ + case `sed 15q $(srcdir)/NEWS` in \ + *"$(VERSION)"*\) : ;; \ + *\) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ - esac -endif %?CK-NEWS% + esac) endif %?TOPDIR_P% if %?TOPDIR_P% $(am.dist.remove-distdir) -- 1.7.12.rc0
