automake-patches
[Top][All Lists]
Advanced

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

fixes for "command input -o output" when POSIXLY_CORRECT=1


From: Paul Eggert
Subject: fixes for "command input -o output" when POSIXLY_CORRECT=1
Date: Tue, 8 Oct 2002 17:09:52 -0700 (PDT)

POSIX says that command options must come before operands, and when
POSIXLY_CORRECT=1 several GNU command enforce this, but Automake generates
makefiles that do not follow this rule in some cases.  I observed this
problem with Autoconf when fixing the POSIXLY_CORRECT=1 bug reported in
<http://mail.gnu.org/pipermail/autoconf/2002-October/014258.html>.
So I installed this patch into Automake.

2002-10-08  Paul Eggert  <address@hidden>

        * lib/am/texibuild.am (%DEST_PREFIX%%DEST_SUFFIX%,
        %DEST_PREFIX%.dvi, %DEST_PREFIX%.pdf): Use "makeinfo -o output
        input", not "makeinfo input -o output", as the latter fails if
        POSIXLY_CORRECT=1.
        * lib/am/texinfos.am (.dvi.ps): Likewise for dvips.
        * m4/depend.m4 (_AM_DEPENDENCIES): Likewise for $depcc.

Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.10
diff -p -u -r1.10 texibuild.am
--- lib/am/texibuild.am 24 Sep 2002 22:30:38 -0000      1.10
+++ lib/am/texibuild.am 8 Oct 2002 23:53:30 -0000
@@ -31,7 +31,7 @@
 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
 ?DIRSTAMP?     @test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
        $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
-       `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+        -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
 ?GENERIC?%SOURCE_SUFFIX%.dvi:
 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
@@ -41,7 +41,7 @@
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) 
%MAKEINFOFLAGS%' \
 ## 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?     $(TEXI2DVI) -o $@ `test -f '%SOURCE%' || echo 
'$(srcdir)/'`%SOURCE%
 
 ?GENERIC?%SOURCE_SUFFIX%.pdf:
 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
@@ -51,7 +51,7 @@
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) 
%MAKEINFOFLAGS%' \
 ## 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 $@
+?!GENERIC?     $(TEXI2PDF) -o $@ `test -f '%SOURCE%' || echo 
'$(srcdir)/'`%SOURCE%
 
 ## If we are using the generic rules, we need separate dependencies.
 ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.98
diff -p -u -r1.98 texinfos.am
--- lib/am/texinfos.am  11 Sep 2002 08:00:10 -0000      1.98
+++ lib/am/texinfos.am  8 Oct 2002 23:53:30 -0000
@@ -56,7 +56,7 @@ endif %?LOCAL-TEXIS%
 if %?LOCAL-TEXIS%
 DVIPS = dvips
 .dvi.ps:
-       $(DVIPS) $< -o $@
+       $(DVIPS) -o $@ $<
 endif %?LOCAL-TEXIS%
 
 .PHONY: info info-am dvi dvi-am pdf pdf-am
Index: m4/depend.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depend.m4,v
retrieving revision 1.26
diff -p -u -r1.26 depend.m4
--- m4/depend.m4        7 Jul 2002 22:38:46 -0000       1.26
+++ m4/depend.m4        8 Oct 2002 23:53:31 -0000
@@ -92,7 +92,7 @@ AC_CACHE_CHECK([dependency style of $dep
     if depmode=$depmode \
        source=conftest.c object=conftest.o \
        depfile=conftest.Po tmpdepfile=conftest.TPo \
-       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
        grep conftest.h conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       am_cv_$1_dependencies_compiler_type=$depmode




reply via email to

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