recognize .txi extension
authorTom Tromey <tromey@redhat.com>
Mon, 23 Feb 1998 23:30:34 +0000 (23:30 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Feb 1998 23:30:34 +0000 (23:30 +0000)
ChangeLog
automake.in
lib/am/texinfos.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/texinfo6.test [new file with mode: 0755]
texinfos.am

index 4f64e74..3f3a2a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Mon Feb 23 13:38:56 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * 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.
 
index a29e8c4..47ef816 100755 (executable)
@@ -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'})
     {
index d04b894..f61b7dc 100644 (file)
@@ -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
 ## 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:
index 6af0eee..ba0e47e 100644 (file)
@@ -1,3 +1,7 @@
+Mon Feb 23 16:20:49 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * texinfo6.test: New file.
+
 Mon Feb 16 00:08:58 1998  Tom Tromey  <tromey@cygnus.com>
 
        * aclocali.test: New file.
index 21358d7..2d7e285 100644 (file)
@@ -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)
 
index de97aa6..befd52f 100644 (file)
@@ -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 (executable)
index 0000000..dd984f8
--- /dev/null
@@ -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
index d04b894..f61b7dc 100644 (file)
@@ -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
 ## 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: