From 97528d6982a02e5d63090e1eb38830d1e696f1a1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 3 Oct 1998 11:28:00 +0000 Subject: [PATCH] Bug fix from Jim Blandy: * 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 | 7 +++++++ depend2.am | 13 ++++++++++--- lib/am/depend2.am | 13 ++++++++++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55593bcc..2925418a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-10-03 Jim Blandy + + * 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 * automake.in (handle_configure): Handle case where there is no diff --git a/depend2.am b/depend2.am index 5e266622..a6b33de3 100644 --- a/depend2.am +++ b/depend2.am @@ -35,7 +35,10 @@ ## 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 @@ -43,10 +46,14 @@ @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 diff --git a/lib/am/depend2.am b/lib/am/depend2.am index 5e266622..a6b33de3 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -35,7 +35,10 @@ ## 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 @@ -43,10 +46,14 @@ @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 -- 2.43.5