Add all-html-files-under
This allows to run droiddoc on only a specific set of subdirectories
instead of using all subdirectories.
Change-Id: I6b5daa31f6ce6801705a5c87bd05ea0e4e8c5d88
diff --git a/core/definitions.mk b/core/definitions.mk
index 038bf49..a355c71 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -223,12 +223,25 @@
endef
###########################################################
+## Find all of the html files under the named directories.
+## Meant to be used like:
+## SRC_FILES := $(call all-html-files-under,src tests)
+###########################################################
+
+define all-html-files-under
+$(patsubst ./%,%, \
+ $(shell cd $(LOCAL_PATH) ; \
+ find $(1) -name "*.html" -and -not -name ".*") \
+ )
+endef
+
+###########################################################
## Find all of the html files from here. Meant to be used like:
## SRC_FILES := $(call all-subdir-html-files)
###########################################################
define all-subdir-html-files
-$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) ; find . -name "*.html"))
+$(call all-html-files-under,.)
endef
###########################################################