[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH] [ng] texinfo: pattern rules with empty suffixes ar
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH] [ng] texinfo: pattern rules with empty suffixes are OK |
Date: |
Fri, 15 Jun 2012 17:30:28 +0200 |
So we can remove a workaround required by Solaris make from our
texinfo rules.
* automake.in (output_texinfo_build_rules): Don't define the boolean
'$generic_info' anymore. Drop the 'SOURCE_INFO' and 'GENERIC_INFO'
transforms when processing the 'texibuild.am' file. Remove obsolete
comments, and adjust some of the remaining ones.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC_INFO?'
is true.
* t/txinfo3.sh: Adjust and extend.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 24 +++---------------------
lib/am/texibuild.am | 5 +----
t/txinfo3.sh | 35 +++++++++++++++++++++++++++--------
3 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/automake.in b/automake.in
index 83b26b8..03d0310 100644
--- a/automake.in
+++ b/automake.in
@@ -2859,10 +2859,9 @@ sub output_texinfo_build_rules ($$$@)
$ssfx ||= "";
$dsfx ||= "";
- # We can output two kinds of rules: the "generic" rules use Make
- # suffix rules and are appropriate when $source and $dest do not lie
- # in a sub-directory; the "specific" rules are needed in the other
- # case.
+ # We can output two kinds of rules: the "generic" rules use pattern
+ # rules and are appropriate when $source and $dest do not lie in a
+ # sub-directory; the "specific" rules are needed in the other case.
#
# The former are output only once (this is not really apparent here,
# but just remember that some logic deeper in Automake will not
@@ -2891,20 +2890,6 @@ sub output_texinfo_build_rules ($$$@)
# if needed.)
$generic = 0 unless $insrc;
- # We cannot use a suffix rule to build info files with an empty
- # extension. Otherwise we would output a single suffix inference
- # rule, with separate dependencies, as in
- #
- # .texi:
- # $(MAKEINFO) ...
- # foo.info: foo.texi
- #
- # which confuse Solaris make. (See the Autoconf manual for
- # details.) Therefore we use a specific rule in this case. This
- # applies to info files only (dvi and pdf files always have an
- # extension).
- my $generic_info = ($generic && $dsfx) ? 1 : 0;
-
my $dipfx = ($insrc ? '$(srcdir)/' : '') . $dpfx;
$output_rules .= file_contents ('texibuild',
@@ -2917,13 +2902,10 @@ sub output_texinfo_build_rules ($$$@)
DEST_INFO_PREFIX => $dipfx,
DEST_SUFFIX => $dsfx,
GENERIC => $generic,
- GENERIC_INFO => $generic_info,
INSRC => $insrc,
MAKEINFOFLAGS => $makeinfoflags,
SOURCE => ($generic
? '$<' : $source),
- SOURCE_INFO => ($generic_info
- ? '$<' : $source),
SOURCE_REAL => $source,
SOURCE_SUFFIX => $ssfx,
TEXIQUIET => verbose_flag('texinfo'),
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 049d894..735b2d8 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -14,8 +14,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-?GENERIC_INFO?%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
-?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
+%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
?!INSRC? @$(am__ensure_target_dir_exists)
## Back up the info files before running makeinfo. This is the cheapest
## way to ensure that
@@ -103,9 +102,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
fi
## If we are using the generic rules, we need separate dependencies.
-if %?GENERIC_INFO%
%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
-endif %?GENERIC_INFO%
if %?GENERIC%
%DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
diff --git a/t/txinfo3.sh b/t/txinfo3.sh
index 88e1bac..7363c39 100755
--- a/t/txinfo3.sh
+++ b/t/txinfo3.sh
@@ -24,7 +24,10 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-info_TEXINFOS = textutils.texi
+info_TEXINFOS = textutils.texi doc/automake-ng.texi
+.PHONY: echo-info-deps
+echo-info-deps:
+ echo ' ' $(INFO_DEPS) ' '
END
cat > textutils.texi <<EOF
@@ -36,18 +39,34 @@ Hello walls.
@bye
EOF
+mkdir doc
+cat > doc/automake-ng.texi <<EOF
+\input texinfo
address@hidden automake-ng
address@hidden automake-ng
address@hidden Top
+Blurb.
address@hidden
+EOF
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-grep '^INFO_DEPS.*textutils$' Makefile.in
-
-# We should not use single suffix inference rules (with separate
-# dependencies), this confuses Solaris make.
-grep '^\.texi:$' Makefile.in && Exit 1
-grep 'textutils: *textutils\.texi' Makefile.in
-
./configure
$MAKE distcheck
+$MAKE
+test -f textutils
+test -f doc/automake-ng
+test ! -f textutils.info
+test ! -f doc/automake-ng.info
+
+$MAKE distdir
+test -f $distdir/textutils
+test -f $distdir/doc/automake-ng
+
+$MAKE echo-info-deps | grep '[ /]textutils '
+$MAKE echo-info-deps | grep '[ /]doc/automake-ng '
+
:
--
1.7.9.5
- [Automake-NG] [PATCH] [ng] texinfo: pattern rules with empty suffixes are OK,
Stefano Lattarini <=