Bug fix from Jim Blandy:
authorTom Tromey <tromey@redhat.com>
Sat, 3 Oct 1998 11:28:01 +0000 (11:28 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 3 Oct 1998 11:28:01 +0000 (11:28 +0000)
* depend2.am (%.lo): When editing the dependency file to add the
.lo file to the targets, allow for whitespace between the end of
the filename and the colon.  Some compilers (notably the Cygnus
release of GCC 2.7-97r1) put space there: "alist.o : ..."

ChangeLog
depend2.am
lib/am/depend2.am

index 55593bc..2925418 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1998-10-03  Jim Blandy  <jimb@zwingli.cygnus.com>
+
+       * depend2.am (%.lo): When editing the dependency file to add the
+       .lo file to the targets, allow for whitespace between the end of
+       the filename and the colon.  Some compilers (notably the Cygnus
+       release of GCC 2.7-97r1) put space there: "alist.o : ..."
+
 Sat Oct  3 12:07:21 1998  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (handle_configure): Handle case where there is no
index 5e26662..a6b33de 100644 (file)
 ## this for us directly.
        @-cp .deps/$(*F).p .deps/$(*F).P; \
        tr '\\ ' '\n\n' < .deps/$(*F).p \
-         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/:/' \
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
            >> .deps/$(*F).P; \
        rm .deps/$(*F).p
 
        @echo '$(LT@PFX@COMPILE) -c $<'; \
 ## See above to understand implementation weirdness.
        $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*F).p -c $<
-       @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
+## Account for versions of gcc that put a space before the `:'.
+       @-sed -e 's/^\([^:]*\)\.o[      ]:/\1.lo \1.o :/' \
          < .deps/$(*F).p > .deps/$(*F).P; \
 ## See above to understand deleted header file trick.
        tr '\\ ' '\n\n' < .deps/$(*F).p \
-         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/:/' \
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
            >> .deps/$(*F).P; \
        rm -f .deps/$(*F).p
index 5e26662..a6b33de 100644 (file)
 ## this for us directly.
        @-cp .deps/$(*F).p .deps/$(*F).P; \
        tr '\\ ' '\n\n' < .deps/$(*F).p \
-         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/:/' \
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
            >> .deps/$(*F).P; \
        rm .deps/$(*F).p
 
        @echo '$(LT@PFX@COMPILE) -c $<'; \
 ## See above to understand implementation weirdness.
        $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*F).p -c $<
-       @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
+## Account for versions of gcc that put a space before the `:'.
+       @-sed -e 's/^\([^:]*\)\.o[      ]:/\1.lo \1.o :/' \
          < .deps/$(*F).p > .deps/$(*F).P; \
 ## See above to understand deleted header file trick.
        tr '\\ ' '\n\n' < .deps/$(*F).p \
-         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/:/' \
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+         | sed -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
            >> .deps/$(*F).P; \
        rm -f .deps/$(*F).p