diff options
author | Ying Wang <wangying@google.com> | 2012-09-07 17:04:06 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2012-09-07 17:04:06 -0700 |
commit | c23f4efdbbb8ce76fd5027ef4e2b6ee316ffeb2b (patch) | |
tree | 003346f2100c6e393f3709bb8fc704f15cc7c403 /core/definitions.mk | |
parent | 1b70bb2162d74a304bd0d00674a0fed80f936961 (diff) | |
download | build-c23f4efdbbb8ce76fd5027ef4e2b6ee316ffeb2b.zip build-c23f4efdbbb8ce76fd5027ef4e2b6ee316ffeb2b.tar.gz build-c23f4efdbbb8ce76fd5027ef4e2b6ee316ffeb2b.tar.bz2 |
Add transform-d-to-p-args
This new indirection allows us too to output .P files when we are
generating non-.o files, such as .s or .S files.
Bug: 7127743
Change-Id: I9e46c417031764fefc9909ba4a3eb63885f34f9e
Diffstat (limited to 'core/definitions.mk')
-rw-r--r-- | core/definitions.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/definitions.mk b/core/definitions.mk index 1508cc6..4dace8d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -761,12 +761,17 @@ endef ########################################################### ## Commands for munging the dependency files GCC generates ########################################################### +# $(1): the input .d file +# $(2): the output .P file +define transform-d-to-p-args +$(hide) cp $(1) $(2); \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(1) >> $(2); \ + rm -f $(1) +endef define transform-d-to-p -$(hide) cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) +$(call transform-d-to-p-args,$(@:%.o=%.d),$(@:%.o=%.P)) endef ########################################################### |