Merge commit 'remotes/goog/donut' into donut-release

This commit is contained in:
The Android Open Source Project
2009-08-11 13:48:19 -07:00
4 changed files with 26 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ LOCAL_PREBUILT_LIBS:=
LOCAL_PREBUILT_EXECUTABLES:= LOCAL_PREBUILT_EXECUTABLES:=
LOCAL_PREBUILT_JAVA_LIBRARIES:= LOCAL_PREBUILT_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:= LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STRIP_COMMENTS:=
LOCAL_INTERMEDIATE_SOURCES:= LOCAL_INTERMEDIATE_SOURCES:=
LOCAL_JAVA_LIBRARIES:= LOCAL_JAVA_LIBRARIES:=
LOCAL_NO_STANDARD_LIBRARIES:= LOCAL_NO_STANDARD_LIBRARIES:=

View File

@@ -1469,6 +1469,13 @@ define copy-file-to-target-with-cp
$(hide) cp -fp $< $@ $(hide) cp -fp $< $@
endef endef
# The same as copy-file-to-target, but strip out "# comment"-style
# comments (for config files and such).
define copy-file-to-target-strip-comments
@mkdir -p $(dir $@)
$(hide) sed -e 's/#.*$$//' -e 's/[ \t]*$$//' -e '/^$$/d' < $< > $@
endef
# The same as copy-file-to-target, but don't preserve # The same as copy-file-to-target, but don't preserve
# the old modification time. # the old modification time.
define copy-file-to-new-target define copy-file-to-new-target
@@ -1489,6 +1496,12 @@ define transform-prebuilt-to-target
$(copy-file-to-target) $(copy-file-to-target)
endef endef
# Copy a prebuilt file to a target location, stripping "# comment" comments.
define transform-prebuilt-to-target-strip-comments
@echo "$(if $(PRIVATE_IS_HOST_MODULE),host,target) Prebuilt: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target-strip-comments)
endef
########################################################### ###########################################################
## On some platforms (MacOS), after copying a static ## On some platforms (MacOS), after copying a static

View File

@@ -3,7 +3,7 @@
## ##
## Additional inputs from base_rules.make: ## Additional inputs from base_rules.make:
## None. ## None.
## ##
########################################################### ###########################################################
ifneq ($(LOCAL_PREBUILT_LIBS),) ifneq ($(LOCAL_PREBUILT_LIBS),)
@@ -26,8 +26,13 @@ else
prebuilt_module_is_a_library := prebuilt_module_is_a_library :=
endif endif
ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
$(transform-prebuilt-to-target-strip-comments)
else
$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP) $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP)
$(transform-prebuilt-to-target) $(transform-prebuilt-to-target)
endif
ifneq ($(prebuilt_module_is_a_library),) ifneq ($(prebuilt_module_is_a_library),)
ifneq ($(LOCAL_IS_HOST_MODULE),) ifneq ($(LOCAL_IS_HOST_MODULE),)
$(transform-host-ranlib-copy-hack) $(transform-host-ranlib-copy-hack)

View File

@@ -106,13 +106,17 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(ACP)
$(hide) touch $@ $(hide) touch $@
# Generate the test descriptions for the core-tests # Generate the test descriptions for the core-tests
# Parameters:
# $1 : The output file where the description should be written (without the '.xml' extension)
# $2 : The AndroidManifest.xml corresponding to the test package
# $3 : The name of the TestSuite generator class to use
# $4 : The Android.mk corresponding to the test package (required for host-side tests only)
define generate-core-test-description define generate-core-test-description
@echo "Generate core-test description ("$(notdir $(1))")" @echo "Generate core-test description ("$(notdir $(1))")"
$(hide) java $(PRIVATE_JAVAOPTS) \ $(hide) java $(PRIVATE_JAVAOPTS) \
-classpath $(PRIVATE_CLASSPATH) \ -classpath $(PRIVATE_CLASSPATH) \
$(PRIVATE_PARAMS) CollectAllTests $(1) \ $(PRIVATE_PARAMS) CollectAllTests $(1) \
$(2) $(3) $(2) $(3) $(4)
endef endef
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON) CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)