From 26d5b8c4b23e717220e0c25b80925284950e39e0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 23 Feb 1998 23:30:34 +0000 Subject: [PATCH] recognize .txi extension --- ChangeLog | 4 ++++ automake.in | 6 ++++-- lib/am/texinfos.am | 42 +++++++++++++++++++++++++++++++++++++++++- tests/ChangeLog | 4 ++++ tests/Makefile.am | 3 ++- tests/Makefile.in | 3 ++- tests/texinfo6.test | 15 +++++++++++++++ texinfos.am | 42 +++++++++++++++++++++++++++++++++++++++++- 8 files changed, 113 insertions(+), 6 deletions(-) create mode 100755 tests/texinfo6.test diff --git a/ChangeLog b/ChangeLog index 4f64e74a2..3f3a2a881 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Mon Feb 23 13:38:56 1998 Tom Tromey + * texinfos.am (.txi.info, .txi.dvi, .txi): New rules. + * automake.in (handle_texinfo): Recognize .txi files. From Karl + Berry. + * automake.in (handle_single_transform_list): $objpat now a parameter. Set $objpat when suffix rule found. diff --git a/automake.in b/automake.in index a29e8c4ba..47ef8167e 100755 --- a/automake.in +++ b/automake.in @@ -1995,7 +1995,9 @@ sub handle_texinfo foreach $info_cursor (@texis) { - ($infobase = $info_cursor) =~ s/\.texi(nfo)?$//; + # FIXME: This is mildly hacky, since it recognizes "txinfo". + # I don't feel like making it right. + ($infobase = $info_cursor) =~ s/\.te?xi(nfo)?$//; # If 'version.texi' is referenced by input file, then include # automatic versioning capability. @@ -2151,7 +2153,7 @@ sub handle_texinfo $output_rules .= "clean-info: mostlyclean-aminfo\n"; } - push (@suffixes, '.texi', '.texinfo', '.info', '.dvi', '.ps'); + push (@suffixes, '.texi', '.texinfo', '.txi', '.info', '.dvi', '.ps'); if (! defined $options{'no-installinfo'}) { diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index d04b894af..f61b7dcb9 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -15,6 +15,10 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## FIXME: should repeat all the stuff in this file. Instead should +## generate the contents in a smarter way. + .texi.info: ## We want to force the .info file to be built in srcdir. This is ## probably the simplest way. However, at Cygnus .info files are @@ -87,6 +91,42 @@ CYGNUS $(MAKEINFO) -I $(srcdir) $< ## if it is in srcdir. MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< +.txi.info: +## We want to force the .info file to be built in srcdir. This is +## probably the simplest way. However, at Cygnus .info files are +## always put into the build directory. So at runtime we select which +## rule to use. +## 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 +## around -- dead files which will end up in the distribution. +NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] +NOTCYGNUS cd $(srcdir) \ +NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'` +CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9] +CYGNUS $(MAKEINFO) -I $(srcdir) $< + +.txi.dvi: + TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \ +## Must set MAKEINFO like this so that version.texi will be found even +## if it is in srcdir. + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.txi: +## We want to force the .info file to be built in srcdir. This is +## probably the simplest way. However, at Cygnus .info files are +## always put into the build directory. So at runtime we select which +## rule to use. +## 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 +## around -- dead files which will end up in the distribution. +NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] +NOTCYGNUS cd $(srcdir) \ +NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'` +CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9] +CYGNUS $(MAKEINFO) -I $(srcdir) $< + ## The way to make PostScript, for those who want it. DVIPS = dvips .dvi.ps: diff --git a/tests/ChangeLog b/tests/ChangeLog index 6af0eee7f..ba0e47e07 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 23 16:20:49 1998 Tom Tromey + + * texinfo6.test: New file. + Mon Feb 16 00:08:58 1998 Tom Tromey * aclocali.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 21358d752..2d7e285b0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,7 +28,8 @@ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test unused.test condman.test texinfo5.test aclocali.test +whoami.test unused.test condman.test texinfo5.test aclocali.test \ +texinfo6.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index de97aa68f..befd52ff3 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -89,7 +89,8 @@ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test unused.test condman.test texinfo5.test aclocali.test +whoami.test unused.test condman.test texinfo5.test aclocali.test \ +texinfo6.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/texinfo6.test b/tests/texinfo6.test new file mode 100755 index 000000000..dd984f824 --- /dev/null +++ b/tests/texinfo6.test @@ -0,0 +1,15 @@ +#! /bin/sh + +# Test to make sure `.txi' extension works. +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +info_TEXINFOS = foo.txi +END + +echo '@setfilename foo.info' > foo.txi +: > texinfo.tex + +$AUTOMAKE || exit 1 + +fgrep '.txi.info' Makefile.in diff --git a/texinfos.am b/texinfos.am index d04b894af..f61b7dcb9 100644 --- a/texinfos.am +++ b/texinfos.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -15,6 +15,10 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## FIXME: should repeat all the stuff in this file. Instead should +## generate the contents in a smarter way. + .texi.info: ## We want to force the .info file to be built in srcdir. This is ## probably the simplest way. However, at Cygnus .info files are @@ -87,6 +91,42 @@ CYGNUS $(MAKEINFO) -I $(srcdir) $< ## if it is in srcdir. MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< +.txi.info: +## We want to force the .info file to be built in srcdir. This is +## probably the simplest way. However, at Cygnus .info files are +## always put into the build directory. So at runtime we select which +## rule to use. +## 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 +## around -- dead files which will end up in the distribution. +NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] +NOTCYGNUS cd $(srcdir) \ +NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'` +CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9] +CYGNUS $(MAKEINFO) -I $(srcdir) $< + +.txi.dvi: + TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \ +## Must set MAKEINFO like this so that version.texi will be found even +## if it is in srcdir. + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.txi: +## We want to force the .info file to be built in srcdir. This is +## probably the simplest way. However, at Cygnus .info files are +## always put into the build directory. So at runtime we select which +## rule to use. +## 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 +## around -- dead files which will end up in the distribution. +NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] +NOTCYGNUS cd $(srcdir) \ +NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'` +CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9] +CYGNUS $(MAKEINFO) -I $(srcdir) $< + ## The way to make PostScript, for those who want it. DVIPS = dvips .dvi.ps: -- 2.47.3