From abcfaff579e3c4787d782ba0e37045207207b3ec Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 10 Apr 1999 22:51:49 +0000 Subject: [PATCH] * depend2.am (%.o): Use `$(*D)/$(*F)', not just `$(*F)'. (%.lo): Likewise. --- ChangeLog | 3 +++ depend2.am | 20 ++++++++++---------- lib/am/depend2.am | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf5b1e4b..f6af9313 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-04-10 Tom Tromey + * depend2.am (%.o): Use `$(*D)/$(*F)', not just `$(*F)'. + (%.lo): Likewise. + * automake.in (am_install_var): Remove redundancies from the result. Fixes test cond8.test. diff --git a/depend2.am b/depend2.am index dec3e822..be93a8ba 100644 --- a/depend2.am +++ b/depend2.am @@ -26,34 +26,34 @@ ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). - $(@PFX@COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + $(@PFX@COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c $< ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - @-cp .deps/$(*F).pp .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ + @-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \ + tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ ## 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 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm .deps/$(*F).pp + >> .deps/$(*D)/$(*F).P; \ + rm .deps/$(*D)/$(*F).pp %.lo: %@EXT@ @echo '$(LT@PFX@COMPILE) -c $<'; \ ## See above to understand implementation weirdness. - $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c $< ## Account for versions of gcc that put a space before the `:'. @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*F).pp > .deps/$(*F).P; \ + < .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \ ## See above to understand deleted header file trick. - tr ' ' '\012' < .deps/$(*F).pp \ + tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ ## 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 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm -f .deps/$(*F).pp + >> .deps/$(*D)/$(*F).P; \ + rm -f .deps/$(*D)/$(*F).pp diff --git a/lib/am/depend2.am b/lib/am/depend2.am index dec3e822..be93a8ba 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -26,34 +26,34 @@ ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). - $(@PFX@COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + $(@PFX@COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c $< ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - @-cp .deps/$(*F).pp .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ + @-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \ + tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ ## 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 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm .deps/$(*F).pp + >> .deps/$(*D)/$(*F).P; \ + rm .deps/$(*D)/$(*F).pp %.lo: %@EXT@ @echo '$(LT@PFX@COMPILE) -c $<'; \ ## See above to understand implementation weirdness. - $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + $(LT@PFX@COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c $< ## Account for versions of gcc that put a space before the `:'. @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*F).pp > .deps/$(*F).P; \ + < .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \ ## See above to understand deleted header file trick. - tr ' ' '\012' < .deps/$(*F).pp \ + tr ' ' '\012' < .deps/$(*D)/$(*F).pp \ ## 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 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm -f .deps/$(*F).pp + >> .deps/$(*D)/$(*F).P; \ + rm -f .deps/$(*D)/$(*F).pp -- 2.43.5