Add libcore-docs target

Add a local droiddoc target that cuts the review time for javadoc
changes from several minutes to less than a minute.

Docs.mk is the list of directories to javadoc within libcore that was
refactored from frameworks/base/Android.mk

Change-Id: I5c12b48e71b849c2883ebaafaddea5f6c6dea857
diff --git a/JavaLibrary.mk b/JavaLibrary.mk
index e954f99..af55897 100644
--- a/JavaLibrary.mk
+++ b/JavaLibrary.mk
@@ -280,3 +280,45 @@
     include $(BUILD_HOST_JAVA_LIBRARY)
 
 endif
+
+#
+# Local droiddoc for faster libcore testing
+#
+#
+# Run with:
+#     m libcore-docs
+#
+# Main output:
+#     out/target/common/docs/libcore/reference/packages.html
+#
+# All text for proofreading (or running tools over):
+#     out/target/common/docs/libcore-proofread.txt
+#
+# TODO list of missing javadoc, etc:
+#     out/target/common/docs/libcore-docs-todo.html
+#
+# Rerun:
+#     rm -rf out/target/common/docs/libcore-timestamp && m libcore-docs
+#
+include $(CLEAR_VARS)
+
+# for shared defintion of libcore_to_document
+include $(LOCAL_PATH)/Docs.mk
+
+LOCAL_SRC_FILES:=$(call find-other-java-files, $(libcore_to_document))
+# rerun doc generation without recompiling the java
+LOCAL_JAVA_LIBRARIES:=
+LOCAL_MODULE_CLASS:=JAVA_LIBRARIES
+
+LOCAL_MODULE := libcore
+
+LOCAL_DROIDDOC_OPTIONS:= \
+ -offlinemode \
+ -title "libcore" \
+ -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
+ -todo ../$(LOCAL_MODULE)-docs-todo.html \
+ -hdf android.whichdoc offline
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
+
+include $(BUILD_DROIDDOC)