Add droiddoc flag LOCAL_DROIDDOC_STUB_OUT_DIR
When calling droiddoc to generate stubs, if you use LOCAL_DROIDDOC_STUB_OUT_DIR (instead of "-stubs" to LOCAL_DROIDDOC_LOCAL_DROIDDOC_OPTIONS), the build system gets the chance to clean up the stub out directory before calling doclava. Bug: 22534021 Change-Id: Icb0a73eb51bfb1c1ecd88217ebcd39c27df1de29
This commit is contained in:
parent
0bf4e3fad3
commit
5adfc3eb8b
2 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,7 @@ LOCAL_DROIDDOC_ASSET_DIR:=
|
|||
LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:=
|
||||
LOCAL_DROIDDOC_OPTIONS:=
|
||||
LOCAL_DROIDDOC_HTML_DIR:=
|
||||
LOCAL_DROIDDOC_STUB_OUT_DIR:=
|
||||
LOCAL_ADDITIONAL_HTML_DIR:=
|
||||
LOCAL_ASSET_DIR:=
|
||||
LOCAL_RESOURCE_DIR:=
|
||||
|
|
|
@ -98,6 +98,7 @@ endif
|
|||
|
||||
$(full_target): PRIVATE_OUT_DIR := $(out_dir)
|
||||
$(full_target): PRIVATE_DROIDDOC_OPTIONS := $(LOCAL_DROIDDOC_OPTIONS)
|
||||
$(full_target): PRIVATE_STUB_OUT_DIR := $(LOCAL_DROIDDOC_STUB_OUT_DIR)
|
||||
|
||||
# Lists the input files for the doc build into a text file
|
||||
# suitable for the @ syntax of javadoc.
|
||||
|
@ -164,6 +165,7 @@ $(full_target): \
|
|||
$(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||
@echo Docs droiddoc: $(PRIVATE_OUT_DIR)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
$(addprefix $(hide) rm -rf ,$(PRIVATE_STUB_OUT_DIR))
|
||||
$(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
|
||||
$(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
|
||||
$(hide) ( \
|
||||
|
@ -185,6 +187,7 @@ $(full_target): \
|
|||
-d $(PRIVATE_OUT_DIR) \
|
||||
$(PRIVATE_CURRENT_BUILD) $(PRIVATE_CURRENT_TIME) \
|
||||
$(PRIVATE_DROIDDOC_OPTIONS) \
|
||||
$(addprefix -stubs ,$(PRIVATE_STUB_OUT_DIR)) \
|
||||
&& touch -f $@ \
|
||||
) || (rm -rf $(PRIVATE_OUT_DIR) $(PRIVATE_SRC_LIST_FILE); exit 45)
|
||||
|
||||
|
|
Loading…
Reference in a new issue