Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
du
android_build
Commits
0f6f4ca5
Commit
0f6f4ca5
authored
14 years ago
by
Ying Wang
Browse files
Options
Download
Email Patches
Plain Diff
Unbundle the build system.
Change-Id: I88912d876c3972212e8871b3e5b3b8b6d2da34d0
parent
ba16a89d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
17 deletions
+56
-17
core/base_rules.mk
core/base_rules.mk
+1
-1
core/config.mk
core/config.mk
+16
-12
core/package.mk
core/package.mk
+10
-3
core/tasks/apicheck.mk
core/tasks/apicheck.mk
+6
-1
tools/Android.mk
tools/Android.mk
+23
-0
No files found.
core/base_rules.mk
View file @
0f6f4ca5
...
...
@@ -190,7 +190,7 @@ aidl_preprocess_import :=
LOCAL_SDK_VERSION
:=
$(
strip
$(LOCAL_SDK_VERSION)
)
ifdef
LOCAL_SDK_VERSION
ifneq
($(LOCAL_SDK_VERSION),current)
aidl_preprocess_import
:=
-p
$(
TOPDIR)
prebuilt/sdk
/
$(LOCAL_SDK_VERSION)
/framework.aidl
aidl_preprocess_import
:=
-p
$(
HISTORICAL_SDK_VERSIONS_ROOT)
/
$(LOCAL_SDK_VERSION)
/framework.aidl
endif
# !current
endif
# LOCAL_SDK_VERSION
$(aidl_java_sources)
:
PRIVATE_AIDL_FLAGS := -b $(aidl_preprocess_import) -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I
,
$(LOCAL_AIDL_INCLUDES))
...
...
This diff is collapsed.
Click to expand it.
core/config.mk
View file @
0f6f4ca5
...
...
@@ -314,22 +314,26 @@ PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE)
# ###############################################################
# The files that we can convert into android.jars are are in config/api/*.xml
# The 'current' version is whatever this source tree is. Once the apicheck
# tool can generate the stubs from the xml files, we'll use that to be
# able to build back-versions. In the meantime, 'current' is the only
# one supported.
HISTORICAL_SDK_VERSIONS_ROOT
:=
$(TOPDIR)
prebuilt/sdk
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
# The 'current' version is whatever this source tree is.
#
# sgrax is the opposite of xargs. It takes the list of args and puts them
# on each line for sort to process.
# sort -g is a numeric sort, so 1 2 3 10 instead of 1 10 2 3.
TARGET_AVAILABLE_SDK_VERSIONS
:=
current
\
$(
shell
function
sgrax
(
)
{
\
while
[
-n
"
$$
1"
]
;
do
echo
$$
1
;
shift
;
done
\
}
;
\
(
sgrax
$(
patsubst
$(SRC_API_DIR)
/%.xml,%,
\
$(
filter-out
$(SRC_API_DIR)
/current.xml,
\
$(
shell
find
$(SRC_API_DIR)
-name
"*.xml"
)))
|
sort
-g
)
)
# Numerically sort a list of numbers
# $(1): the list of numbers to be sorted
define
numerically_sort
$(shell
function
sgrax()
{
\
while
[
-n
"$$1"
]
;
do
echo
$$1
;
shift
;
done
\
}
;
\
(
sgrax
$(1)
|
sort
-g
)
)
endef
TARGET_AVAILABLE_SDK_VERSIONS
:=
current
$(
call
numerically_sort,
\
$(
patsubst
$(HISTORICAL_SDK_VERSIONS_ROOT)
/%/android.jar,%,
\
$(
wildcard
$(HISTORICAL_SDK_VERSIONS_ROOT)
/
*
/android.jar
)))
INTERNAL_PLATFORM_API_FILE
:=
$(TARGET_OUT_COMMON_INTERMEDIATES)
/PACKAGING/public_api.xml
This diff is collapsed.
Click to expand it.
core/package.mk
View file @
0f6f4ca5
...
...
@@ -244,17 +244,24 @@ else
# Most packages should link against the resources defined by framework-res.
# Even if they don't have their own resources, they may use framework
# resources.
ifneq
($(filter-out current,$(LOCAL_SDK_VERSION)),)
# for released sdk versions, the platform resources were built into android.jar.
framework_res_package_export
:=
\
$(HISTORICAL_SDK_VERSIONS_ROOT)
/
$(LOCAL_SDK_VERSION)
/android.jar
framework_res_package_export_deps
:=
$(framework_res_package_export)
else
# LOCAL_SDK_VERSION
framework_res_package_export
:=
\
$(
call
intermediates-dir-for,APPS,framework-res,,COMMON
)
/package-export.apk
$(LOCAL_INTERMEDIATE_TARGETS)
:
\
PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
# We can't depend directly on the export.apk file; it won't get its
# PRIVATE_ vars set up correctly if we do. Instead, depend on the
# corresponding R.stamp file, which lists the export.apk as a dependency.
framework_res_package_export_deps
:=
\
$(
dir
$(framework_res_package_export)
)
src/R.stamp
endif
# LOCAL_SDK_VERSION
$(R_file_stamp)
:
$(framework_res_package_export_deps)
endif
$(LOCAL_INTERMEDIATE_TARGETS)
:
\
PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
endif
# LOCAL_NO_STANDARD_LIBRARIES
ifneq
($(full_classes_jar),)
$(LOCAL_BUILT_MODULE)
:
PRIVATE_DEX_FILE := $(built_dex)
...
...
This diff is collapsed.
Click to expand it.
core/tasks/apicheck.mk
View file @
0f6f4ca5
...
...
@@ -41,13 +41,18 @@ endef
# Run the checkapi rules by default.
droidcore
:
checkapi
last_released_sdk_version
:=
$(
lastword
$(
call
numerically_sort,
\
$(
patsubst
$(SRC_API_DIR)
/%.xml,%,
\
$(
filter-out
$(SRC_API_DIR)
/current.xml,
\
$(
wildcard
$(SRC_API_DIR)
/
*
.xml
)))))
# INTERNAL_PLATFORM_API_FILE is the one build by droiddoc.
# Check that the API we're building hasn't broken the last-released
# SDK version.
$(eval
$(call
check-api,
\
checkapi-last,
\
$(SRC_API_DIR)/$(last
word
$(TARGET_AVAILABLE_SDK_VERSIONS)
).xml,
\
$(SRC_API_DIR)/$(last
_released_sdk_version
).xml,
\
$(INTERNAL_PLATFORM_API_FILE),
\
-hide
2
-hide
3
-hide
4
-hide
5
-hide
6
-hide
24
-hide
25
\
-error
7
-error
8
-error
9
-error
10
-error
11
-error
12
-error
13
-error
14
-error
15
\
...
...
This diff is collapsed.
Click to expand it.
tools/Android.mk
0 → 100644
View file @
0f6f4ca5
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH
:=
$
(
my-dir
)
ifeq
($(strip $(is_unbundled_app_build)),true)
include
$(LOCAL_PATH)/signapk/Android.mk
else
include
$(call first-makefiles-under,$(LOCAL_PATH))
endif
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment