From: Stefano Lattarini Date: Sat, 11 Aug 2012 12:14:32 +0000 (+0200) Subject: [ng] dist: less use of transforms, prefer make variables (4) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ade4d2c549683dcda993f8b6b07c713867ae6d81;p=thirdparty%2Fautomake.git [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 --- 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)