From 227a0280f85f1076fbb1e3d18fe55a3f575b85db Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 16 Jun 2012 12:15:42 +0200 Subject: [PATCH] [ng] texi: always look for mdate-sh in the build-aux directory ... ... 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 --- automake.in | 26 +++---------------------- lib/am/texi-vers.am | 2 +- t/mdate4.sh | 46 --------------------------------------------- t/reqd.sh | 10 ++++------ t/vtexi.sh | 6 ------ 5 files changed, 8 insertions(+), 82 deletions(-) delete mode 100755 t/mdate4.sh diff --git a/automake.in b/automake.in index c8b7f325c..a26f00d84 100644 --- a/automake.in +++ b/automake.in @@ -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"); } } diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index 78c107dd7..ec2f366ff 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -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 index ac1be3a38..000000000 --- a/t/mdate4.sh +++ /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 . - -# 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 - -: diff --git a/t/reqd.sh b/t/reqd.sh index 9e0bcc1f1..1ddac46ee 100755 --- 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 + +: diff --git a/t/vtexi.sh b/t/vtexi.sh index 9d1bc2448..b3035edc9 100755 --- a/t/vtexi.sh +++ b/t/vtexi.sh @@ -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 - : -- 2.47.2