1 # -*- mode: makefile -*- 2 # Copyright (C) 2007 The Android Open Source Project 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # 17 # Definitions for building the Java library and associated tests. 18 # 19 20 # 21 # Common definitions for host and target. 22 # 23 24 # libcore is divided into modules. 25 # 26 # The structure of each module is: 27 # 28 # src/ 29 # main/ # To be shipped on every device. 30 # java/ # Java source for library code. 31 # native/ # C++ source for library code. 32 # resources/ # Support files. 33 # test/ # Built only on demand, for testing. 34 # java/ # Java source for tests. 35 # native/ # C++ source for tests (rare). 36 # resources/ # Support files. 37 # 38 # All subdirectories are optional (hence the "2> /dev/null"s below). 39 40 include $(LOCAL_PATH)/openjdk_java_files.mk 41 include $(LOCAL_PATH)/non_openjdk_java_files.mk 42 43 define all-test-java-files-under 44 $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && (find $(dir)/src/test/java -name "*.java" 2> /dev/null) | grep -v -f java_tests_blacklist))) 45 endef 46 47 define all-core-resource-dirs 48 $(shell cd $(LOCAL_PATH) && ls -d */src/$(1)/{java,resources} 2> /dev/null) 49 endef 50 51 # The Java files and their associated resources. 52 core_resource_dirs := \ 53 luni/src/main/java \ 54 ojluni/src/main/resources/ 55 test_resource_dirs := $(filter-out ojluni/%,$(call all-core-resource-dirs,test)) 56 test_src_files := $(call all-test-java-files-under,dalvik dalvik/test-rules dom harmony-tests json luni xml) 57 ojtest_src_files := $(call all-test-java-files-under,ojluni) 58 ojtest_resource_dirs := $(filter ojluni/%,$(call all-core-resource-dirs,test)) 59 60 ifeq ($(EMMA_INSTRUMENT),true) 61 ifneq ($(EMMA_INSTRUMENT_STATIC),true) 62 nojcore_src_files += $(call all-java-files-under, ../external/emma/core ../external/emma/pregenerated) 63 core_resource_dirs += ../external/emma/core/res ../external/emma/pregenerated/res 64 endif 65 endif 66 67 local_javac_flags=-encoding UTF-8 68 #local_javac_flags+=-Xlint:all -Xlint:-serial,-deprecation,-unchecked 69 local_javac_flags+=-Xmaxwarns 9999999 70 71 72 # 73 # ICU4J related rules. 74 # 75 # We compile android_icu4j along with core-libart because we're implementing parts of core-libart 76 # in terms of android_icu4j. 77 android_icu4j_root := ../external/icu/android_icu4j/ 78 android_icu4j_src_files := $(call all-java-files-under,$(android_icu4j_root)/src/main/java) 79 android_icu4j_resource_dirs := $(android_icu4j_root)/resources 80 81 # 82 # Build for the target (device). 83 # 84 85 include $(CLEAR_VARS) 86 LOCAL_SRC_FILES := $(openjdk_java_files) $(non_openjdk_java_files) $(android_icu4j_src_files) $(openjdk_lambda_stub_files) 87 LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) $(android_icu4j_resource_dirs) 88 LOCAL_NO_STANDARD_LIBRARIES := true 89 LOCAL_JAVACFLAGS := $(local_javac_flags) 90 LOCAL_DX_FLAGS := --core-library 91 LOCAL_MODULE_TAGS := optional 92 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 93 LOCAL_MODULE := core-all 94 LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml 95 LOCAL_CORE_LIBRARY := true 96 LOCAL_UNINSTALLABLE_MODULE := true 97 include $(BUILD_JAVA_LIBRARY) 98 99 include $(CLEAR_VARS) 100 LOCAL_SRC_FILES := $(openjdk_java_files) 101 LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) 102 LOCAL_NO_STANDARD_LIBRARIES := true 103 LOCAL_JAVACFLAGS := $(local_javac_flags) 104 # TODO(oth): Remove --min-sdk-version=26 when the O SDK version is determined. 105 # For now it represents the minimum sdk version required for invoke-polymorphic. 106 # This is only needed when ANDROID_COMPILE_WITH_JACK=false (b/36118520). 107 LOCAL_DX_FLAGS := --core-library --min-sdk-version=26 108 LOCAL_MODULE_TAGS := optional 109 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 110 LOCAL_MODULE := core-oj 111 LOCAL_JAVA_LIBRARIES := core-all 112 LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE 113 LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml 114 LOCAL_CORE_LIBRARY := true 115 include $(BUILD_JAVA_LIBRARY) 116 117 # Definitions to make the core library. 118 include $(CLEAR_VARS) 119 LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) 120 LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) 121 LOCAL_NO_STANDARD_LIBRARIES := true 122 LOCAL_JAVACFLAGS := $(local_javac_flags) 123 LOCAL_DX_FLAGS := --core-library 124 LOCAL_MODULE_TAGS := optional 125 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 126 LOCAL_MODULE := core-libart 127 LOCAL_JAVA_LIBRARIES := core-all 128 ifeq ($(EMMA_INSTRUMENT),true) 129 ifneq ($(EMMA_INSTRUMENT_STATIC),true) 130 # For instrumented build, include Jacoco classes into core-libart. 131 LOCAL_STATIC_JAVA_LIBRARIES := jacocoagent 132 endif # EMMA_INSTRUMENT_STATIC 133 endif # EMMA_INSTRUMENT 134 LOCAL_CORE_LIBRARY := true 135 LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml 136 include $(BUILD_JAVA_LIBRARY) 137 138 # A library that exists to satisfy javac when 139 # compiling source code that contains lambdas. 140 include $(CLEAR_VARS) 141 LOCAL_SRC_FILES := $(openjdk_lambda_stub_files) $(openjdk_lambda_duplicate_stub_files) 142 LOCAL_NO_STANDARD_LIBRARIES := true 143 LOCAL_JAVACFLAGS := $(local_javac_flags) 144 LOCAL_DX_FLAGS := --core-library 145 LOCAL_MODULE_TAGS := optional 146 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 147 LOCAL_MODULE := core-lambda-stubs 148 LOCAL_JAVA_LIBRARIES := core-all 149 LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE 150 LOCAL_CORE_LIBRARY := true 151 LOCAL_UNINSTALLABLE_MODULE := true 152 include $(BUILD_JAVA_LIBRARY) 153 154 ifeq ($(LIBCORE_SKIP_TESTS),) 155 # A guaranteed unstripped version of core-oj and core-libart. 156 # The build system may or may not strip the core-oj and core-libart jars, 157 # but these will not be stripped. See b/24535627. 158 include $(CLEAR_VARS) 159 LOCAL_SRC_FILES := $(openjdk_java_files) 160 LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) 161 LOCAL_NO_STANDARD_LIBRARIES := true 162 LOCAL_JAVACFLAGS := $(local_javac_flags) 163 LOCAL_DX_FLAGS := --core-library 164 LOCAL_MODULE_TAGS := optional 165 LOCAL_DEX_PREOPT := false 166 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 167 LOCAL_MODULE := core-oj-testdex 168 LOCAL_JAVA_LIBRARIES := core-all 169 LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE 170 LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml 171 LOCAL_CORE_LIBRARY := true 172 include $(BUILD_JAVA_LIBRARY) 173 174 # Build libcore test rules for target 175 include $(CLEAR_VARS) 176 LOCAL_SRC_FILES := $(call all-java-files-under, dalvik/test-rules/src/main test-rules/src/main) 177 LOCAL_NO_STANDARD_LIBRARIES := true 178 LOCAL_MODULE := core-test-rules 179 LOCAL_JAVA_LIBRARIES := core-all 180 LOCAL_STATIC_JAVA_LIBRARIES := junit 181 include $(BUILD_STATIC_JAVA_LIBRARY) 182 183 # Build libcore test rules for host 184 include $(CLEAR_VARS) 185 LOCAL_SRC_FILES := $(call all-java-files-under, dalvik/test-rules/src/main test-rules/src/main) 186 LOCAL_NO_STANDARD_LIBRARIES := true 187 LOCAL_MODULE := core-test-rules-hostdex 188 LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex 189 LOCAL_STATIC_JAVA_LIBRARIES := junit-hostdex 190 include $(BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY) 191 192 include $(CLEAR_VARS) 193 LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) 194 LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) 195 LOCAL_NO_STANDARD_LIBRARIES := true 196 LOCAL_JAVACFLAGS := $(local_javac_flags) 197 LOCAL_DX_FLAGS := --core-library 198 LOCAL_MODULE_TAGS := optional 199 LOCAL_DEX_PREOPT := false 200 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 201 LOCAL_MODULE := core-libart-testdex 202 LOCAL_JAVA_LIBRARIES := core-all 203 LOCAL_CORE_LIBRARY := true 204 LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml 205 include $(BUILD_JAVA_LIBRARY) 206 endif 207 208 ifeq ($(LIBCORE_SKIP_TESTS),) 209 # Build a library just containing files from luni/src/test/filesystems for use in tests. 210 include $(CLEAR_VARS) 211 LOCAL_SRC_FILES := $(call all-java-files-under, luni/src/test/filesystems/src) 212 LOCAL_JAVA_RESOURCE_DIRS := luni/src/test/filesystems/resources 213 LOCAL_NO_STANDARD_LIBRARIES := true 214 LOCAL_MODULE := filesystemstest 215 LOCAL_JAVA_LIBRARIES := core-oj core-libart 216 LOCAL_DEX_PREOPT := false 217 include $(BUILD_JAVA_LIBRARY) 218 my_filesystemstest_jar := $(intermediates)/filesystemstest.jar 219 $(my_filesystemstest_jar): $(LOCAL_BUILT_MODULE) 220 $(call copy-file-to-target) 221 endif 222 223 ifeq ($(LIBCORE_SKIP_TESTS),) 224 # Make the core-tests library. 225 include $(CLEAR_VARS) 226 LOCAL_SRC_FILES := $(test_src_files) 227 LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) 228 # Include individual dex.jar files (jars containing resources and a classes.dex) so that they 229 # be loaded by tests using ClassLoaders but are not in the main classes.dex. 230 LOCAL_JAVA_RESOURCE_FILES := $(my_filesystemstest_jar) 231 LOCAL_NO_STANDARD_LIBRARIES := true 232 LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle 233 LOCAL_STATIC_JAVA_LIBRARIES := \ 234 archive-patcher \ 235 core-test-rules \ 236 core-tests-support \ 237 junit-params \ 238 mockftpserver \ 239 mockito-target \ 240 mockwebserver \ 241 nist-pkix-tests \ 242 slf4j-jdk14 \ 243 sqlite-jdbc \ 244 tzdata-testing 245 LOCAL_JAVACFLAGS := $(local_javac_flags) 246 LOCAL_ERROR_PRONE_FLAGS := -Xep:TryFailThrowable:ERROR -Xep:ComparisonOutOfRange:ERROR 247 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 248 LOCAL_MODULE := core-tests 249 include $(BUILD_STATIC_JAVA_LIBRARY) 250 endif 251 252 ifeq ($(LIBCORE_SKIP_TESTS),) 253 # Make the core-tests-support library. 254 include $(CLEAR_VARS) 255 LOCAL_SRC_FILES := $(call all-test-java-files-under,support) 256 LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) 257 LOCAL_NO_STANDARD_LIBRARIES := true 258 LOCAL_JAVA_LIBRARIES := core-oj core-libart junit bouncycastle 259 LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-bcpkix bouncycastle-ocsp 260 LOCAL_JAVACFLAGS := $(local_javac_flags) 261 LOCAL_MODULE := core-tests-support 262 include $(BUILD_STATIC_JAVA_LIBRARY) 263 endif 264 265 ifeq ($(LIBCORE_SKIP_TESTS),) 266 # Make the jsr166-tests library. 267 include $(CLEAR_VARS) 268 LOCAL_SRC_FILES := $(call all-test-java-files-under, jsr166-tests) 269 LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) 270 LOCAL_NO_STANDARD_LIBRARIES := true 271 LOCAL_JAVA_LIBRARIES := core-oj core-libart junit 272 LOCAL_JAVACFLAGS := $(local_javac_flags) 273 LOCAL_MODULE := jsr166-tests 274 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 275 include $(BUILD_STATIC_JAVA_LIBRARY) 276 endif 277 278 # Make the core-ojtests library. 279 ifeq ($(LIBCORE_SKIP_TESTS),) 280 include $(CLEAR_VARS) 281 LOCAL_JAVA_RESOURCE_DIRS := $(ojtest_resource_dirs) 282 LOCAL_NO_STANDARD_LIBRARIES := true 283 LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle 284 LOCAL_STATIC_JAVA_LIBRARIES := testng 285 LOCAL_JAVACFLAGS := $(local_javac_flags) 286 LOCAL_DX_FLAGS := --core-library 287 LOCAL_MODULE_TAGS := optional 288 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 289 LOCAL_MODULE := core-ojtests 290 # jack bug workaround: int[] java.util.stream.StatefulTestOp.-getjava-util-stream-StreamShapeSwitchesValues() is a private synthetic method in an interface which causes a hard verifier error 291 LOCAL_DEX_PREOPT := false # disable AOT preverification which breaks the build. it will still throw VerifyError at runtime. 292 include $(BUILD_JAVA_LIBRARY) 293 endif 294 295 # Make the core-ojtests-public library. Excludes any private API tests. 296 ifeq ($(LIBCORE_SKIP_TESTS),) 297 include $(CLEAR_VARS) 298 # Filter out SerializedLambdaTest because it depends on stub classes and won't actually run. 299 LOCAL_SRC_FILES := $(filter-out %/DeserializeMethodTest.java %/SerializedLambdaTest.java ojluni/src/test/java/util/stream/boot%,$(ojtest_src_files)) # Do not include anything from the boot* directories. Those directories need a custom bootclasspath to run. 300 # Include source code as part of JAR 301 LOCAL_JAVA_RESOURCE_DIRS := ojluni/src/test/dist $(ojtest_resource_dirs) 302 LOCAL_NO_STANDARD_LIBRARIES := true 303 LOCAL_JAVA_LIBRARIES := \ 304 bouncycastle \ 305 core-libart \ 306 core-oj \ 307 okhttp \ 308 testng 309 LOCAL_JAVACFLAGS := $(local_javac_flags) 310 LOCAL_DX_FLAGS := --core-library 311 LOCAL_MODULE_TAGS := optional 312 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 313 LOCAL_MODULE := core-ojtests-public 314 # jack bug workaround: int[] java.util.stream.StatefulTestOp.-getjava-util-stream-StreamShapeSwitchesValues() is a private synthetic method in an interface which causes a hard verifier error 315 LOCAL_DEX_PREOPT := false # disable AOT preverification which breaks the build. it will still throw VerifyError at runtime. 316 include $(BUILD_JAVA_LIBRARY) 317 endif 318 319 # 320 # Build for the host. 321 # 322 323 ifeq ($(HOST_OS),linux) 324 325 include $(CLEAR_VARS) 326 LOCAL_SRC_FILES := $(non_openjdk_java_files) $(openjdk_java_files) $(android_icu4j_src_files) $(openjdk_lambda_stub_files) 327 LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) 328 LOCAL_NO_STANDARD_LIBRARIES := true 329 LOCAL_JAVACFLAGS := $(local_javac_flags) 330 LOCAL_DX_FLAGS := --core-library 331 LOCAL_MODULE_TAGS := optional 332 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 333 LOCAL_MODULE := core-all-hostdex 334 LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host 335 LOCAL_CORE_LIBRARY := true 336 LOCAL_UNINSTALLABLE_MODULE := true 337 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 338 339 include $(CLEAR_VARS) 340 LOCAL_SRC_FILES := $(openjdk_java_files) 341 LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) 342 LOCAL_NO_STANDARD_LIBRARIES := true 343 LOCAL_JAVACFLAGS := $(local_javac_flags) 344 LOCAL_DX_FLAGS := --core-library 345 LOCAL_MODULE_TAGS := optional 346 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 347 LOCAL_MODULE := core-oj-hostdex 348 LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE 349 LOCAL_JAVA_LIBRARIES := core-all-hostdex 350 LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host 351 LOCAL_CORE_LIBRARY := true 352 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 353 354 # Definitions to make the core library. 355 include $(CLEAR_VARS) 356 LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) 357 LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) 358 LOCAL_NO_STANDARD_LIBRARIES := true 359 LOCAL_JAVACFLAGS := $(local_javac_flags) 360 LOCAL_DX_FLAGS := --core-library 361 LOCAL_MODULE_TAGS := optional 362 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 363 LOCAL_MODULE := core-libart-hostdex 364 LOCAL_JAVA_LIBRARIES := core-oj-hostdex 365 LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host 366 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 367 368 # A library that exists to satisfy javac when 369 # compiling source code that contains lambdas. 370 include $(CLEAR_VARS) 371 LOCAL_SRC_FILES := $(openjdk_lambda_stub_files) $(openjdk_lambda_duplicate_stub_files) 372 LOCAL_NO_STANDARD_LIBRARIES := true 373 LOCAL_JAVACFLAGS := $(local_javac_flags) 374 LOCAL_DX_FLAGS := --core-library 375 LOCAL_MODULE_TAGS := optional 376 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 377 LOCAL_MODULE := core-lambda-stubs-hostdex 378 LOCAL_JAVA_LIBRARIES := core-all-hostdex 379 LOCAL_CORE_LIBRARY := true 380 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 381 382 # Make the core-tests-hostdex library. 383 ifeq ($(LIBCORE_SKIP_TESTS),) 384 include $(CLEAR_VARS) 385 LOCAL_SRC_FILES := $(test_src_files) 386 LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) 387 LOCAL_NO_STANDARD_LIBRARIES := true 388 LOCAL_JAVA_LIBRARIES := \ 389 bouncycastle-hostdex \ 390 core-libart-hostdex \ 391 core-oj-hostdex \ 392 core-tests-support-hostdex \ 393 junit-hostdex \ 394 mockito-api-hostdex \ 395 okhttp-hostdex 396 LOCAL_STATIC_JAVA_LIBRARIES := \ 397 archive-patcher-hostdex \ 398 core-test-rules-hostdex \ 399 junit-params-hostdex \ 400 mockftpserver-hostdex \ 401 mockwebserver-host \ 402 nist-pkix-tests-host \ 403 slf4j-jdk14-hostdex \ 404 sqlite-jdbc-host \ 405 tzdata-testing-hostdex 406 LOCAL_JAVACFLAGS := $(local_javac_flags) 407 LOCAL_MODULE_TAGS := optional 408 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 409 LOCAL_MODULE := core-tests-hostdex 410 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 411 endif 412 413 # Make the core-tests-support library. 414 ifeq ($(LIBCORE_SKIP_TESTS),) 415 include $(CLEAR_VARS) 416 LOCAL_SRC_FILES := $(call all-test-java-files-under,support) 417 LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) 418 LOCAL_NO_STANDARD_LIBRARIES := true 419 LOCAL_JAVA_LIBRARIES := \ 420 bouncycastle-hostdex \ 421 core-libart-hostdex \ 422 core-oj-hostdex \ 423 junit-hostdex 424 LOCAL_STATIC_JAVA_LIBRARIES := \ 425 bouncycastle-bcpkix-hostdex \ 426 bouncycastle-ocsp-hostdex 427 LOCAL_JAVACFLAGS := $(local_javac_flags) 428 LOCAL_MODULE_TAGS := optional 429 LOCAL_MODULE := core-tests-support-hostdex 430 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 431 endif 432 433 # Make the core-ojtests-hostdex library. 434 ifeq ($(LIBCORE_SKIP_TESTS),) 435 include $(CLEAR_VARS) 436 LOCAL_SRC_FILES := $(ojtest_src_files) 437 LOCAL_NO_STANDARD_LIBRARIES := true 438 LOCAL_JAVA_LIBRARIES := \ 439 bouncycastle-hostdex \ 440 core-libart-hostdex \ 441 core-oj-hostdex \ 442 okhttp-hostdex 443 LOCAL_STATIC_JAVA_LIBRARIES := testng-hostdex 444 LOCAL_JAVACFLAGS := $(local_javac_flags) 445 LOCAL_DX_FLAGS := --core-library 446 LOCAL_MODULE_TAGS := optional 447 LOCAL_JAVA_LANGUAGE_VERSION := 1.8 448 LOCAL_MODULE := core-ojtests-hostdex 449 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 450 endif 451 452 endif # HOST_OS == linux 453 454 # 455 # Local droiddoc for faster libcore testing 456 # 457 # 458 # Run with: 459 # mm -j32 libcore-docs 460 # 461 # Main output: 462 # ../out/target/common/docs/libcore/reference/packages.html 463 # 464 # All text for proofreading (or running tools over): 465 # ../out/target/common/docs/libcore-proofread.txt 466 # 467 # TODO list of missing javadoc, etc: 468 # ../out/target/common/docs/libcore-docs-todo.html 469 # 470 # Rerun: 471 # rm -rf ../out/target/common/docs/libcore-timestamp && mm -j32 libcore-docs 472 # 473 include $(CLEAR_VARS) 474 475 # for shared defintion of libcore_to_document 476 include $(LOCAL_PATH)/Docs.mk 477 478 # The libcore_to_document paths are relative to $(TOPDIR). We are in libcore so we must prepend 479 # ../ to make LOCAL_SRC_FILES relative to $(LOCAL_PATH). 480 LOCAL_SRC_FILES := $(addprefix ../, $(libcore_to_document)) 481 # rerun doc generation without recompiling the java 482 LOCAL_JAVACFLAGS := $(local_javac_flags) 483 LOCAL_MODULE_CLASS:=JAVA_LIBRARIES 484 485 LOCAL_MODULE := libcore 486 487 LOCAL_DROIDDOC_OPTIONS := \ 488 -offlinemode \ 489 -title "libcore" \ 490 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ 491 -todo ../$(LOCAL_MODULE)-docs-todo.html \ 492 -knowntags ./libcore/known_oj_tags.txt \ 493 -hdf android.whichdoc offline 494 495 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk 496 497 include $(BUILD_DROIDDOC) 498 499 openjdk_java_files := 500 non_openjdk_java_files := 501