automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: automake/354: Texinfos rules require Texinfo 4.1


From: Alexandre Duret-Lutz
Subject: FYI: automake/354: Texinfos rules require Texinfo 4.1
Date: 05 Sep 2002 00:08:04 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

PR/354:
| Description:
|                  The rules used to build ps, pdf, and dvi files use
|                  the `-o' switch of texi2dvi.  (This is used in case
|                  the target is in a subdirectory.)  However this switch
|                  is new in Texinfo 4.1, and these targets (hence distcheck)
|                  will fail with older versions of Texinfo.
| 
|                  (FWIW Texinfo 4.1 was released 6 months ago, and Karl
|                  recommends that everyone use @copying which is new in
|                  Texinfo 4.2.)
| Fix:
|                  Ideas:
|                     1. Do nothing and NEWS that `make ps', `make dvi', 
|                        and `make pdf' require Texinfo 4.1 or greater.
|                     2. Use `-o' only when needed (that is, for files 
|                        in subdirectories, not for generic rules).
|                     3. [Akim's suggestion] cd in the subdirectory before 
|                        running texi2dvi. This will also create Tex's 
|                        satellite files into the subdirectory, which 
|                        sounds cleaner than what we have now.

I'm installing the patch below, which corresponds to #2.  

This means that the only case where users are constrained to
upgrade Texinfo because of Automake is when they want to use the
`ps', `pdf', or `dvi' targets in a package with Texi files in
subdirectories (a new feature in CVS Automake).

I've tried #3.  This would have been smarter, but it's too
tricky to adjust the `-I $(srcdir)' flag correctly after you 
cd into the subdirectory:
 * ../$(srcdir)/subdir is wrong because $(srcdir) can be an absolute path
 * I'm not really fond of using variables like @abs_top_srcdir@; generally
   I think Automake should avoid hard-coding absolute paths in Makefiles
 * Another possibility is doing something like
     abs=`$(am__cd) $(srcdir) && pwd` && cd subdir && \
     $(TEXI2DVI) -I $abs/subdir ...
   This seems to work, but it only solves half of the problem.
   The other half is that the search path for texinfo.tex needs
   to be adjusted too, so you need a second similar kludge.  The
   resulting rule is monstrous, and since there are other
   good reasons to upgrade Texinfo (@copying) it doesn't seem
   worth the pain.

2002-09-04  Alexandre Duret-Lutz  <address@hidden>

        For automake/354:
        * lib/am/texibuild.am (%SOURCE_SUFFIX%.dvi, %SOURCE_SUFFIX%.pdf):
        Don't use `-o' unless necessary.

Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.383
diff -u -r1.383 Makefile.in
--- Makefile.in 25 Aug 2002 20:45:50 -0000      1.383
+++ Makefile.in 4 Sep 2002 22:04:26 -0000
@@ -186,12 +186,12 @@
 .texi.dvi:
        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
-       $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
+       $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$<
 
 .texi.pdf:
        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
-       $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
+       $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$<
 automake.info: version.texi
 automake.dvi: version.texi
 automake.pdf: version.texi
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.191
diff -u -r1.191 NEWS
--- NEWS        25 Aug 2002 20:45:50 -0000      1.191
+++ NEWS        4 Sep 2002 22:04:28 -0000
@@ -17,7 +17,8 @@
   when `make installcheck' is run.  This is enabled by --gnits.
 * Texinfo rules now support the `ps' and `pdf' targets.
 * Info files are now created in the build directory, not the source directory.
-* info_TEXINFOS supports files in subdirectories.
+* info_TEXINFOS supports files in subdirectories (this requires Texinfo 4.1
+  or greater).
 * `make distcheck' will enforce DESTDIR support by attempting
   a DESTDIR install.
 * `+=' can be used in conditionals, even if the augmented variable
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.7
diff -u -r1.7 texibuild.am
--- lib/am/texibuild.am 25 Aug 2002 20:45:51 -0000      1.7
+++ lib/am/texibuild.am 4 Sep 2002 22:04:29 -0000
@@ -39,7 +39,9 @@
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) 
%MAKEINFOFLAGS%' \
-       $(TEXI2DVI) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
+?GENERIC?      $(TEXI2DVI) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+?!GENERIC?     $(TEXI2DVI) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% 
-o $@
 
 ?GENERIC?%SOURCE_SUFFIX%.pdf:
 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
@@ -47,7 +49,9 @@
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) 
%MAKEINFOFLAGS%' \
-       $(TEXI2PDF) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
+?GENERIC?      $(TEXI2PDF) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+?!GENERIC?     $(TEXI2PDF) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% 
-o $@
 
 ## If we are using the generic rules, we need separate dependencies.
 ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]