Elliott Hughes | 7ee3a06 | 2010-02-18 17:20:15 -0800 | [diff] [blame] | 1 | # -*- mode: makefile -*- |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 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 | |
Jesse Wilson | d5d3526 | 2010-05-12 23:56:14 -0700 | [diff] [blame] | 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). |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 39 | |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 40 | define nonopenjdk-main-java-files-under |
| 41 | $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && (find $(dir)/src/main/java -name "*.java" 2> /dev/null) | grep -v -f openjdk_java_files))) |
| 42 | endef |
| 43 | |
| 44 | define openjdk-main-java-files-under |
| 45 | $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && (find $(dir)/src/main/java -name "*.java" 2> /dev/null) | grep -f openjdk_java_files))) |
Jesse Wilson | 32cfe95 | 2010-05-04 16:36:03 -0700 | [diff] [blame] | 46 | endef |
| 47 | |
| 48 | define all-test-java-files-under |
Brian Carlstrom | 302e330 | 2011-03-01 23:59:06 -0800 | [diff] [blame] | 49 | $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(dir)/src/test/java -name "*.java" 2> /dev/null))) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 50 | endef |
| 51 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 52 | define all-core-resource-dirs |
| 53 | $(shell cd $(LOCAL_PATH) && ls -d */src/$(1)/{java,resources} 2> /dev/null) |
| 54 | endef |
| 55 | |
Jesse Wilson | d5d3526 | 2010-05-12 23:56:14 -0700 | [diff] [blame] | 56 | # The Java files and their associated resources. |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 57 | nojcore_src_files := $(call nonopenjdk-main-java-files-under,dalvik dex dom json luni xml) |
| 58 | ojcore_src_files := $(call openjdk-main-java-files-under,ojluni) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 59 | core_resource_dirs := $(call all-core-resource-dirs,main) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 60 | test_resource_dirs := $(call all-core-resource-dirs,test) |
Narayan Kamath | 51525b5 | 2013-11-15 18:02:54 +0000 | [diff] [blame] | 61 | test_src_files := $(call all-test-java-files-under,dalvik dom harmony-tests json luni xml) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 62 | |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 63 | ifeq ($(EMMA_INSTRUMENT),true) |
Ying Wang | ff053c3 | 2012-08-21 17:20:51 -0700 | [diff] [blame] | 64 | ifneq ($(EMMA_INSTRUMENT_STATIC),true) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 65 | nojcore_src_files += $(call all-java-files-under, ../external/emma/core ../external/emma/pregenerated) |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 66 | core_resource_dirs += ../external/emma/core/res ../external/emma/pregenerated/res |
| 67 | endif |
Ying Wang | ff053c3 | 2012-08-21 17:20:51 -0700 | [diff] [blame] | 68 | endif |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 69 | |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 70 | libart_core_src_files := $(call nonopenjdk-main-java-files-under,libart) |
Brian Carlstrom | 3711c21 | 2013-06-25 15:59:29 -0700 | [diff] [blame] | 71 | |
Elliott Hughes | 48d0b3f | 2010-12-14 09:48:52 -0800 | [diff] [blame] | 72 | local_javac_flags=-encoding UTF-8 |
| 73 | #local_javac_flags+=-Xlint:all -Xlint:-serial,-deprecation,-unchecked |
| 74 | local_javac_flags+=-Xmaxwarns 9999999 |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 75 | |
| 76 | # |
| 77 | # Build for the target (device). |
| 78 | # |
| 79 | |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 80 | include $(CLEAR_VARS) |
| 81 | LOCAL_SRC_FILES := $(ojcore_src_files) $(nojcore_src_files) $(libart_core_src_files) |
| 82 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 83 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 84 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 85 | LOCAL_DX_FLAGS := --core-library |
| 86 | LOCAL_MODULE_TAGS := optional |
| 87 | LOCAL_MODULE := core-all |
| 88 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 89 | LOCAL_REQUIRED_MODULES := tzdata |
| 90 | include $(BUILD_JAVA_LIBRARY) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 91 | |
| 92 | include $(CLEAR_VARS) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 93 | LOCAL_SRC_FILES := $(ojcore_src_files) |
| 94 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 95 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 96 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 97 | LOCAL_DX_FLAGS := --core-library |
| 98 | LOCAL_MODULE_TAGS := optional |
| 99 | LOCAL_MODULE := core-oj |
| 100 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 101 | LOCAL_JAVA_LIBRARIES := core-all |
| 102 | LOCAL_REQUIRED_MODULES := tzdata |
| 103 | include $(BUILD_JAVA_LIBRARY) |
| 104 | |
| 105 | # Definitions to make the core library. |
| 106 | include $(CLEAR_VARS) |
| 107 | LOCAL_SRC_FILES := $(libart_core_src_files) $(nojcore_src_files) |
Brian Carlstrom | 3711c21 | 2013-06-25 15:59:29 -0700 | [diff] [blame] | 108 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 109 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 110 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 111 | LOCAL_DX_FLAGS := --core-library |
| 112 | LOCAL_MODULE_TAGS := optional |
| 113 | LOCAL_MODULE := core-libart |
| 114 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 115 | LOCAL_JAVA_LIBRARIES := core-oj |
Brian Carlstrom | 3711c21 | 2013-06-25 15:59:29 -0700 | [diff] [blame] | 116 | LOCAL_REQUIRED_MODULES := tzdata |
| 117 | include $(BUILD_JAVA_LIBRARY) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 118 | |
Kenny Root | 38375a4 | 2013-04-23 15:50:31 -0700 | [diff] [blame] | 119 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 120 | # Make the core-tests library. |
| 121 | include $(CLEAR_VARS) |
Narayan Kamath | 51525b5 | 2013-11-15 18:02:54 +0000 | [diff] [blame] | 122 | LOCAL_SRC_FILES := $(test_src_files) |
Brian Carlstrom | 51ee38b | 2010-07-23 15:57:52 -0700 | [diff] [blame] | 123 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 124 | LOCAL_NO_STANDARD_LIBRARIES := true |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 125 | LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp core-junit bouncycastle |
Neil Fuller | 62fba1e | 2014-05-29 11:52:06 +0100 | [diff] [blame] | 126 | LOCAL_STATIC_JAVA_LIBRARIES := core-tests-support sqlite-jdbc mockwebserver nist-pkix-tests |
Elliott Hughes | d610834 | 2011-02-22 10:13:54 -0800 | [diff] [blame] | 127 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Brian Carlstrom | b094af3 | 2010-05-28 17:37:37 -0700 | [diff] [blame] | 128 | LOCAL_MODULE := core-tests |
Elliott Hughes | 73d3e26 | 2012-08-28 17:56:09 -0700 | [diff] [blame] | 129 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Jesse Wilson | 706d535 | 2010-06-08 17:20:09 -0700 | [diff] [blame] | 130 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Elliott Hughes | c5cd6e8 | 2012-10-18 18:13:10 -0700 | [diff] [blame] | 131 | endif |
Jesse Wilson | 706d535 | 2010-06-08 17:20:09 -0700 | [diff] [blame] | 132 | |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 133 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 134 | # Make the core-tests-support library. |
| 135 | include $(CLEAR_VARS) |
| 136 | LOCAL_SRC_FILES := $(call all-test-java-files-under,support) |
| 137 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 138 | LOCAL_NO_STANDARD_LIBRARIES := true |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 139 | LOCAL_JAVA_LIBRARIES := core-oj core-libart core-junit bouncycastle |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 140 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 141 | LOCAL_MODULE := core-tests-support |
| 142 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 143 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 144 | endif |
| 145 | |
| 146 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 147 | # Make the jsr166-tests library. |
| 148 | include $(CLEAR_VARS) |
| 149 | LOCAL_SRC_FILES := $(call all-test-java-files-under, jsr166-tests) |
| 150 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 151 | LOCAL_NO_STANDARD_LIBRARIES := true |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 152 | LOCAL_JAVA_LIBRARIES := core-oj core-libart core-junit |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 153 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 154 | LOCAL_MODULE := jsr166-tests |
| 155 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 156 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 157 | endif |
| 158 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 159 | # This one's tricky. One of our tests needs to have a |
| 160 | # resource with a "#" in its name, but Perforce doesn't |
| 161 | # allow us to submit such a file. So we create it here |
| 162 | # on-the-fly. |
Ying Wang | 43624e7 | 2011-06-06 15:34:59 -0700 | [diff] [blame] | 163 | TMP_RESOURCE_DIR := $(intermediates.COMMON)/tmp/ |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 164 | TMP_RESOURCE_FILE := org/apache/harmony/luni/tests/java/lang/test\#.properties |
| 165 | |
| 166 | $(TMP_RESOURCE_DIR)$(TMP_RESOURCE_FILE): |
| 167 | @mkdir -p $(dir $@) |
| 168 | @echo "Hello, world!" > $@ |
| 169 | |
Ying Wang | 43624e7 | 2011-06-06 15:34:59 -0700 | [diff] [blame] | 170 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS := $(extra_jar_args) -C "$(TMP_RESOURCE_DIR)" "$(TMP_RESOURCE_FILE)" |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 171 | $(LOCAL_INTERMEDIATE_TARGETS): $(TMP_RESOURCE_DIR)$(TMP_RESOURCE_FILE) |
| 172 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 173 | |
| 174 | # |
| 175 | # Build for the host. |
| 176 | # |
| 177 | |
Tsu Chiang Chuang | 25963ae | 2013-07-23 16:39:20 -0700 | [diff] [blame] | 178 | include $(CLEAR_VARS) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 179 | LOCAL_SRC_FILES := $(call nonopenjdk-main-java-files-under, dex) |
Tsu Chiang Chuang | 25963ae | 2013-07-23 16:39:20 -0700 | [diff] [blame] | 180 | LOCAL_MODULE_TAGS := optional |
| 181 | LOCAL_MODULE := dex-host |
| 182 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 183 | |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 184 | include $(CLEAR_VARS) |
| 185 | LOCAL_SRC_FILES := $(ojcore_src_files) $(nojcore_src_files) $(libart_core_src_files) |
| 186 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 187 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 188 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 189 | LOCAL_DX_FLAGS := --core-library |
| 190 | LOCAL_MODULE_TAGS := optional |
| 191 | LOCAL_MODULE := core-all-hostdex |
| 192 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 193 | LOCAL_REQUIRED_MODULES := tzdata-host |
| 194 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 195 | |
| 196 | include $(CLEAR_VARS) |
| 197 | LOCAL_SRC_FILES := $(ojcore_src_files) |
| 198 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 199 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 200 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 201 | LOCAL_DX_FLAGS := --core-library |
| 202 | LOCAL_MODULE_TAGS := optional |
| 203 | LOCAL_MODULE := core-oj-hostdex |
| 204 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
| 205 | LOCAL_JAVA_LIBRARIES := core-all-hostdex |
| 206 | LOCAL_REQUIRED_MODULES := tzdata-host |
| 207 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 208 | |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 209 | # Definitions to make the core library. |
| 210 | include $(CLEAR_VARS) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 211 | LOCAL_SRC_FILES := $(nojcore_src_files) $(libart_core_src_files) |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 212 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 213 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 214 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 215 | LOCAL_DX_FLAGS := --core-library |
| 216 | LOCAL_MODULE_TAGS := optional |
| 217 | LOCAL_MODULE := core-libart-hostdex |
| 218 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 219 | LOCAL_JAVA_LIBRARIES := core-oj-hostdex |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 220 | LOCAL_REQUIRED_MODULES := tzdata-host |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 221 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 222 | |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 223 | # Make the core-tests library. |
| 224 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Brian Carlstrom | d39b1d6 | 2011-03-06 23:15:39 -0800 | [diff] [blame] | 225 | include $(CLEAR_VARS) |
Narayan Kamath | 51525b5 | 2013-11-15 18:02:54 +0000 | [diff] [blame] | 226 | LOCAL_SRC_FILES := $(test_src_files) |
Brian Carlstrom | d39b1d6 | 2011-03-06 23:15:39 -0800 | [diff] [blame] | 227 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
Neil Fuller | 9496b21 | 2014-09-04 11:11:56 +0100 | [diff] [blame] | 228 | LOCAL_NO_STANDARD_LIBRARIES := true |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 229 | LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex okhttp-hostdex bouncycastle-hostdex core-junit-hostdex core-tests-support-hostdex |
Brian Carlstrom | 22a12c9 | 2013-01-17 16:18:31 -0800 | [diff] [blame] | 230 | LOCAL_STATIC_JAVA_LIBRARIES := sqlite-jdbc-host mockwebserver-host nist-pkix-tests-host |
Brian Carlstrom | d39b1d6 | 2011-03-06 23:15:39 -0800 | [diff] [blame] | 231 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Ying Wang | e79ac58 | 2012-08-23 11:25:27 -0700 | [diff] [blame] | 232 | LOCAL_MODULE_TAGS := optional |
Brian Carlstrom | d39b1d6 | 2011-03-06 23:15:39 -0800 | [diff] [blame] | 233 | LOCAL_MODULE := core-tests-hostdex |
Elliott Hughes | 73d3e26 | 2012-08-28 17:56:09 -0700 | [diff] [blame] | 234 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Narayan Kamath | 70e8ce8 | 2013-10-28 14:17:35 +0000 | [diff] [blame] | 235 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 236 | endif |
Kenny Root | ba07db5 | 2013-08-29 13:40:35 -0700 | [diff] [blame] | 237 | |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 238 | # Make the core-tests-support library. |
| 239 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Kenny Root | ba07db5 | 2013-08-29 13:40:35 -0700 | [diff] [blame] | 240 | include $(CLEAR_VARS) |
| 241 | LOCAL_SRC_FILES := $(call all-test-java-files-under,support) |
| 242 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
Neil Fuller | 9496b21 | 2014-09-04 11:11:56 +0100 | [diff] [blame] | 243 | LOCAL_NO_STANDARD_LIBRARIES := true |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 244 | LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex core-junit-hostdex bouncycastle-hostdex |
Kenny Root | ba07db5 | 2013-08-29 13:40:35 -0700 | [diff] [blame] | 245 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 246 | LOCAL_MODULE_TAGS := optional |
| 247 | LOCAL_MODULE := core-tests-support-hostdex |
| 248 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Narayan Kamath | 70e8ce8 | 2013-10-28 14:17:35 +0000 | [diff] [blame] | 249 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Elliott Hughes | 67cc34b | 2010-02-19 22:14:19 -0800 | [diff] [blame] | 250 | endif |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 251 | |
| 252 | # |
| 253 | # Local droiddoc for faster libcore testing |
| 254 | # |
| 255 | # |
| 256 | # Run with: |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 257 | # mm -j32 libcore-docs |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 258 | # |
| 259 | # Main output: |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 260 | # ../out/target/common/docs/libcore/reference/packages.html |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 261 | # |
| 262 | # All text for proofreading (or running tools over): |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 263 | # ../out/target/common/docs/libcore-proofread.txt |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 264 | # |
| 265 | # TODO list of missing javadoc, etc: |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 266 | # ../out/target/common/docs/libcore-docs-todo.html |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 267 | # |
| 268 | # Rerun: |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 269 | # rm -rf ../out/target/common/docs/libcore-timestamp && mm -j32 libcore-docs |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 270 | # |
| 271 | include $(CLEAR_VARS) |
| 272 | |
| 273 | # for shared defintion of libcore_to_document |
| 274 | include $(LOCAL_PATH)/Docs.mk |
| 275 | |
Ying Wang | 21ac42d | 2013-12-04 15:54:36 -0800 | [diff] [blame] | 276 | LOCAL_SRC_FILES := $(libcore_to_document) |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 277 | # rerun doc generation without recompiling the java |
| 278 | LOCAL_JAVA_LIBRARIES:= |
Elliott Hughes | d610834 | 2011-02-22 10:13:54 -0800 | [diff] [blame] | 279 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 280 | LOCAL_MODULE_CLASS:=JAVA_LIBRARIES |
| 281 | |
| 282 | LOCAL_MODULE := libcore |
Elliott Hughes | 73d3e26 | 2012-08-28 17:56:09 -0700 | [diff] [blame] | 283 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 284 | |
Elliott Hughes | b986327 | 2012-11-08 14:28:29 -0800 | [diff] [blame] | 285 | LOCAL_DROIDDOC_OPTIONS := \ |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 286 | -offlinemode \ |
| 287 | -title "libcore" \ |
| 288 | -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ |
| 289 | -todo ../$(LOCAL_MODULE)-docs-todo.html \ |
| 290 | -hdf android.whichdoc offline |
| 291 | |
| 292 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk |
| 293 | |
| 294 | include $(BUILD_DROIDDOC) |