am 4595d7d6: am 410420ed: am 9efa5bae: Merge "Add transform-d-to-p-args"

* commit '4595d7d62c0d594aa3501e4f547563348a3a5eb0':
  Add transform-d-to-p-args
This commit is contained in:
Ying Wang 2012-09-10 10:25:41 -07:00 committed by Android Git Automerger
commit 5586106944

View file

@ -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
###########################################################