]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] texi: always look for mdate-sh in the build-aux directory ...
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Jun 2012 10:15:42 +0000 (12:15 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 17 Jun 2012 08:11:51 +0000 (10:11 +0200)
... rather than in the current directory if the path of the build-aux
directory had been determined automatically and not explicitly specified
through an AC_CONFIG_AUX_DIR invocation.  This rid us of an ugly
inconsistency wart that was only present for historical reasons.

* automake.in (handle_texinfo_helper): Do not look for the required file
'mdate-sh' in the current directory if $config_aux_dir_set_in_configure_ac
is false; unconditionally look for it in the build-aux directory.
* lib/am/texi-vers.am: Simplify accordingly, getting rid of the (now
undefined by automake) transform %MDDIR%.
* t/mdate4.sh: Remove as obsolete.
* t/vtexi.sh: Remove an hairy and obsolescent grepping check, to avoid
spurious failures.
* t/reqd.sh: Adjust not to check for multiple installations of mdate-sh;
these don't take place anymore.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in
lib/am/texi-vers.am
t/mdate4.sh [deleted file]
t/reqd.sh
t/vtexi.sh

index c8b7f325c11130d060de132d329f068f50919a0e..a26f00d84aa90d50881016384a1152760a6bc7bf 100644 (file)
@@ -3066,34 +3066,14 @@ sub handle_texinfo_helper ($)
          my $vti = ($done ? $done : 'vti');
          ++$done;
 
-         # This is ugly, but it is our historical practice.
-         if ($config_aux_dir_set_in_configure_ac)
-           {
-             require_conf_file_with_macro (TRUE, 'info_TEXINFOS', FOREIGN,
-                                           'mdate-sh');
-           }
-         else
-           {
-             require_file_with_macro (TRUE, 'info_TEXINFOS',
-                                      FOREIGN, 'mdate-sh');
-           }
-
-         my $conf_dir;
-         if ($config_aux_dir_set_in_configure_ac)
-           {
-             $conf_dir = '$(am__config_aux_dir)/';
-           }
-         else
-           {
-             $conf_dir = '$(srcdir)/';
-           }
+          require_conf_file_with_macro (TRUE, 'info_TEXINFOS',
+                                        FOREIGN, 'mdate-sh');
          $output_rules .= file_contents ('texi-vers',
                                          new Automake::Location,
                                          TEXI     => $texi,
                                          VTI      => $vti,
                                          STAMPVTI => "${soutdir}stamp-$vti",
-                                         VTEXI    => "$soutdir$vtexi",
-                                         MDDIR    => $conf_dir);
+                                         VTEXI    => "$soutdir$vtexi");
        }
     }
 
index 78c107dd7828f99de9c5f4989e9ddea1bd0e393a..ec2f366ffc0725598aa7cf6e2aa40ba23fbebf1e 100644 (file)
@@ -28,7 +28,7 @@ am__dist_common += %VTEXI% %STAMPVTI%
 ## in this file.)
 %STAMPVTI%: %TEXI% $(top_srcdir)/configure
        @$(am__ensure_target_dir_exists)
-       @(set `$(SHELL) %MDDIR%mdate-sh $<`; \
+       @(set `$(SHELL) $(am__config_aux_dir)/mdate-sh $<`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
diff --git a/t/mdate4.sh b/t/mdate4.sh
deleted file mode 100755 (executable)
index ac1be3a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that mdate-sh is added to the right directory.
-# Report from Kevin Dalley.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-END
-
-mkdir sub
-
-cat > sub/Makefile.am << 'END'
-info_TEXINFOS = textutils.texi
-END
-
-cat > sub/textutils.texi << 'END'
-@include version.texi
-@setfilename textutils.info
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-ls -l sub
-test -f sub/mdate-sh
-
-:
index 9e0bcc1f1d042c1f36726d6f92f08bd0b2862acb..1ddac46ee1541db0c8c3c918fb472c275eff41ea 100755 (executable)
--- a/t/reqd.sh
+++ b/t/reqd.sh
@@ -28,18 +28,16 @@ mkdir one
 mkdir two
 
 echo 'SUBDIRS = one two' > Makefile.am
+
 echo 'info_TEXINFOS = mumble.texi' > one/Makefile.am
-cat >one/mumble.texi <<'END'
-@setfilename mumble.info
-@include version.texi
-END
+echo @setfilename mumble.info > one/mumble.texi
 
 cp one/Makefile.am one/mumble.texi two
 
 $ACLOCAL
 $AUTOMAKE --add-missing --copy
 
-test -f one/mdate-sh
 test -f one/texinfo.tex
-test -f two/mdate-sh
 test -f two/texinfo.tex
+
+:
index 9d1bc2448557d9adde88e4b7e1777f8ee789dd4a..b3035edc9c4973f2b29f56df52ff60bb7f1d3b46 100755 (executable)
@@ -53,10 +53,4 @@ grep '^\$(srcdir)/textutils\.info:.*[ /]version\.texi *$' Makefile.in
 $EGREP 'stamp-vti:.*textutils\.texi( .*)?$' Makefile.in
 $EGREP 'stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
 
-# Check that the path to mdate-sh is correct.  Over escaping of '$'
-# etc. once led to '\$\(srcdir\)/mdate-sh'.
-# Filter out '$(srcdir)/mdate-sh'; there should be no occurrences
-# of '.../mdate-sh' left then.
-sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && Exit 1
-
 :