summaryrefslogtreecommitdiffstats
path: root/core/package.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-06-18 18:45:40 -0700
committerYing Wang <wangying@google.com>2012-06-18 18:45:40 -0700
commit0d570a71630d70a80e838f068d413f1c1a5f55af (patch)
treed7d145c61067b2fdabdf232dc44479587f21f2c2 /core/package.mk
parent596549c4d3c3bfb35c6764d1efd58c1d9f8f197b (diff)
downloadbuild-0d570a71630d70a80e838f068d413f1c1a5f55af.zip
build-0d570a71630d70a80e838f068d413f1c1a5f55af.tar.gz
build-0d570a71630d70a80e838f068d413f1c1a5f55af.tar.bz2
lint support.
Bug: 6167394 $make lint-<app-name> # to lint on a single module $make lintall # to lint on all packages in the source tree. Change-Id: I4decc76fb75793ce44809232b0ec72b766fbb434
Diffstat (limited to 'core/package.mk')
-rw-r--r--core/package.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/package.mk b/core/package.mk
index 45f1fcf..ebc5378 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -416,4 +416,14 @@ endif
PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME)
+# Lint phony targets
+.PHONY: lint-$(LOCAL_PACKAGE_NAME)
+lint-$(LOCAL_PACKAGE_NAME): PRIVATE_PATH := $(LOCAL_PATH)
+lint-$(LOCAL_PACKAGE_NAME): PRIVATE_LINT_FLAGS := $(LOCAL_LINT_FLAGS)
+lint-$(LOCAL_PACKAGE_NAME) :
+ @echo lint $(PRIVATE_PATH)
+ $(LINT) $(PRIVATE_LINT_FLAGS) $(PRIVATE_PATH)
+
+lintall : lint-$(LOCAL_PACKAGE_NAME)
+
endif # skip_definition