From ade4d2c549683dcda993f8b6b07c713867ae6d81 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 11 Aug 2012 14:14:32 +0200 Subject: [PATCH] [ng] dist: less use of transforms, prefer make variables (4) * 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 --- automake.in | 3 ++- lib/am/distdir.am | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/automake.in b/automake.in index 59cb29e18..4ca052543 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 b38116b54..3a3be46d2 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -159,14 +159,11 @@ 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), \ + sed 15q $(srcdir)/NEWS | grep -F '$(VERSION)' || { \ echo "NEWS not updated; not releasing" 1>&2; \ - exit 1;; \ - esac -endif %?CK-NEWS% + exit 1; \ + }) endif %?TOPDIR_P% if %?TOPDIR_P% $(am.dist.remove-distdir) -- 2.47.2