• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

development


Commit MetaInfo

修訂e4ccbd68ec540739819bea7e109d29d08a54122a (tree)
時間2011-06-08 03:25:07
作者Ying Wang <wangying@goog...>
CommiterYing Wang

Log Message

Use a function to package android support libraries.

Change-Id: I52240b31fba7728b74d57fd806a93988e3ac8fe9

Change Summary

差異

--- a/build/Android.mk
+++ b/build/Android.mk
@@ -66,22 +66,20 @@ $(android_jar_full_target): $(full_target)
6666 ALL_SDK_FILES += $(android_jar_full_target)
6767
6868
69-android-support-v4_build_module := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android-support-v4_intermediates/javalib.jar
70-android-support-v4_intermediates := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android-support-v4_intermediates
71-android-support-v4_full_target := $(android-support-v4_intermediates)/android-support-v4.jar
72-$(android-support-v4_full_target): $(android-support-v4_build_module)
73- @echo Package android-support-v4.jar: $@
74- $(hide)mkdir -p $(dir $@)
75- $(hide)$(ACP) $< $@
69+# $(1): the Java library name
70+define _package_sdk_library
71+$(eval _psm_build_module := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/$(1)_intermediates/javalib.jar)
72+$(eval _psm_packaging_target := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(1)_intermediates/$(1).jar)
73+$(_psm_packaging_target) : $(_psm_build_module) | $(ACP)
74+ @echo "Package $(1).jar: $$@"
75+ $(hide) mkdir -p $$(dir $$@)
76+ $(hide) $(ACP) $$< $$@
7677
77-ALL_SDK_FILES += $(android-support-v4_full_target)
78+ALL_SDK_FILES += $(_psm_packaging_target)
79+$(eval _psm_build_module :=)
80+$(eval _psm_packaging_target :=)
81+endef
7882
79-android-support-v13_build_module := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android-support-v13_intermediates/javalib.jar
80-android-support-v13_intermediates := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android-support-v13_intermediates
81-android-support-v13_full_target := $(android-support-v13_intermediates)/android-support-v13.jar
82-$(android-support-v13_full_target): $(android-support-v13_build_module)
83- @echo Package android-support-v13.jar: $@
84- $(hide)mkdir -p $(dir $@)
85- $(hide)$(ACP) $< $@
83+ANDROID_SUPPORT_LIBRARIES := android-support-v4 android-support-v13
8684
87-ALL_SDK_FILES += $(android-support-v13_full_target)
85+$(foreach lib, $(ANDROID_SUPPORT_LIBRARIES), $(eval $(call _package_sdk_library,$(lib))))