+2002-11-30 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * tests/texinfo3.test: Make sure we don't output single suffix
+ inference rules when building `.info'-less Info files (this
+ confuses Solaris make). Run distcheck to make sure the rules
+ work.
+ * automake.in (output_texinfo_build_rules): Define GENERIC_INFO
+ and SOURCE_INFO.
+ * lib/am/texibuild.am (%SOURCE_SUFFIX%%DEST_SUFFIX%,
+ %DEST_PREFIX%%DEST_SUFFIX%): Honor GENERIC_INFO and SOURCE_INFO.
+
2002-11-29 Alexandre Duret-Lutz <adl@gnu.org>
For PR automake/359:
$makeinfoflags = "-I $sdir -I \$(srcdir)/$sdir";
}
+ # 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;
+
# If the resulting file lie into a subdirectory,
# make sure this directory will exist.
my $dirstamp = require_build_directory_maybe ($dest);
$output_rules .= &file_contents ('texibuild',
new Automake::Location,
GENERIC => $generic,
+ GENERIC_INFO => $generic_info,
SOURCE_SUFFIX => $ssfx,
SOURCE => ($generic ? '$<' : $source),
+ SOURCE_INFO => ($generic_info ?
+ '$<' : $source),
SOURCE_REAL => $source,
DEST_PREFIX => $dpfx,
DEST_SUFFIX => $dsfx,
## 02111-1307, USA.
-?GENERIC?%SOURCE_SUFFIX%%DEST_SUFFIX%:
-?!GENERIC?%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE% %DEPS%
+?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%:
+?!GENERIC_INFO?%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
## Note that we also remove the possible output files before running
## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
## using --no-split), you'll be left with some dead info files lying
## Therefore we ensure that %DIRSTAMP% exists in the rule.
?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
- -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+ -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%
?GENERIC?%SOURCE_SUFFIX%.dvi:
?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
## If we are using the generic rules, we need separate dependencies.
## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
## rules.)
-if %?GENERIC%
+if %?GENERIC_INFO%
%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
+endif %?GENERIC_INFO%
+if %?GENERIC%
%DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
endif %?GENERIC%
# Test to make sure .info-less @setfilename works.
+required='makeinfo tex'
. ./defs || exit 1
set -e
+echo AC_OUTPUT >> configure.in
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
-echo '@setfilename textutils' > textutils.texi
-: > texinfo.tex
+cat > textutils.texi <<EOF
+\input texinfo
+@setfilename textutils
+@settitle main
+@node Top
+Hello walls.
+@bye
+EOF
$ACLOCAL
-$AUTOMAKE
+$AUTOCONF
+$AUTOMAKE --add-missing
grep '^INFO_DEPS.*textutils$' Makefile.in
-grep '^.texi:$' 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