]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] dist: less use of transforms, prefer make variables (4)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 12:14:32 +0000 (14:14 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 12:34:14 +0000 (14:34 +0200)
* 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 <stefano.lattarini@gmail.com>
automake.in
lib/am/distdir.am

index 59cb29e18d1326b88359fee41e6e5a6a74675dd6..4ca052543347643b4aee9714cf5d4856b58b8b35 100644 (file)
@@ -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,
index b38116b54bce066838fff293cfc107be2efe215d..3a3be46d2db9ccf7a091a02eff6d4b195bede36c 100644 (file)
@@ -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)