From aff7619c0b36d695a5d5e8406e3a0be90f85efd4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 3 Oct 1998 11:28:01 +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 55593bcc4..2925418a2 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 5e266622a..a6b33de3e 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 5e266622a..a6b33de3e 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.47.3