am e1f94189: am ce811261: Merge "Move check-api to definition.mk" into jb-mr1.1-dev

* commit 'e1f94189d95084a72d206d89ecb9d38de0512fc6':
  Move check-api to definition.mk
This commit is contained in:
Ying Wang
2012-11-15 15:23:44 -08:00
committed by Android Git Automerger
2 changed files with 48 additions and 35 deletions

View File

@@ -2065,6 +2065,29 @@ $(if $(_erm_new_modules),$(eval $(1) += $(_erm_new_modules))\
$(call expand-required-modules,$(1),$(_erm_new_modules)))
endef
###########################################################
## API Check
###########################################################
# eval this to define a rule that runs apicheck.
#
# Args:
# $(1) target
# $(2) stable api file
# $(3) api file to be tested
# $(4) arguments for apicheck
# $(5) command to run if apicheck failed
# $(6) target dependent on this api check
# $(7) additional dependencies
define check-api
$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp: $(2) $(3) $(APICHECK) $(7)
@echo "Checking API:" $(1)
$(hide) ( $(APICHECK_COMMAND) $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
$(hide) mkdir -p $$(dir $$@)
$(hide) touch $$@
$(6): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp
endef
###########################################################
## Other includes
###########################################################