auto import from //branches/cupcake/...@132569
This commit is contained in:
parent
41977d7cd2
commit
4d23ccc023
|
@ -65,6 +65,14 @@ ifndef CUSTOM_MODULES
|
|||
#CUSTOM_MODULES:=
|
||||
endif
|
||||
|
||||
# Choose additional locales, like "en_US" or "it_IT", to add to any
|
||||
# built product. Any locales that appear in CUSTOM_LOCALES but not in
|
||||
# the locale list for the selected product will be added to the end
|
||||
# of PRODUCT_LOCALES.
|
||||
ifndef CUSTOM_LOCALES
|
||||
#CUSTOM_LOCALES:=
|
||||
endif
|
||||
|
||||
# If you have a special place to put your ouput files, set this, otherwise
|
||||
# it goes to <build-root>/out
|
||||
#OUT_DIR:=/tmp/stuff
|
||||
|
|
|
@ -197,20 +197,6 @@ $(APKCERTS_FILE): $(all_built_packages)
|
|||
.PHONY: apkcerts-list
|
||||
apkcerts-list: $(APKCERTS_FILE)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# installed file list
|
||||
INSTALLED_FILES_FILE := $(PRODUCT_OUT)/installed-files.txt
|
||||
$(INSTALLED_FILES_FILE): $(ALL_DEFAULT_INSTALLED_MODULES)
|
||||
@echo Installed file list: $@
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -f $@
|
||||
$(hide) (cd $(PRODUCT_OUT) && \
|
||||
find system data -type f -printf 'name="%p" size=%s\n') | \
|
||||
sort > $@
|
||||
|
||||
.PHONY: installed-file-list
|
||||
installed-file-list: $(INSTALLED_FILES_FILE)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# module info file
|
||||
ifdef CREATE_MODULE_INFO_FILE
|
||||
|
@ -900,6 +886,20 @@ endif
|
|||
|
||||
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# installed file list
|
||||
# Depending on $(INSTALLED_SYSTEMIMAGE) ensures that it
|
||||
# gets the DexOpt one if we're doing that.
|
||||
INSTALLED_FILES_FILE := $(PRODUCT_OUT)/installed-files.txt
|
||||
$(INSTALLED_FILES_FILE): $(INSTALLED_SYSTEMIMAGE)
|
||||
@echo Installed file list: $@
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -f $@
|
||||
$(hide) build/tools/fileslist.py $(TARGET_OUT) $(TARGET_OUT_DATA) > $@
|
||||
|
||||
.PHONY: installed-file-list
|
||||
installed-file-list: $(INSTALLED_FILES_FILE)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# A zip of the tests that are built when running "make tests".
|
||||
# This is very similar to BUILT_TARGET_FILES_PACKAGE, but we
|
||||
|
|
|
@ -104,8 +104,14 @@ else
|
|||
# Don't bother with this extra part when explicitly building the sdk product.
|
||||
building_sdk :=
|
||||
endif
|
||||
current_build_config := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)
|
||||
|
||||
# A change in the list of locales warrants an installclean, too.
|
||||
locale_list := $(subst $(space),$(comma),$(strip $(PRODUCT_LOCALES)))
|
||||
|
||||
current_build_config := \
|
||||
$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(locale_list)}
|
||||
building_sdk :=
|
||||
locale_list :=
|
||||
force_installclean := false
|
||||
|
||||
# Read the current state from the file, if present.
|
||||
|
|
|
@ -93,9 +93,5 @@ define get-file-size
|
|||
stat -f "%z" $(1)
|
||||
endef
|
||||
|
||||
# Which gcc to use to build qemu, which doesn't work right when
|
||||
# built with 4.2.1 or later.
|
||||
GCCQEMU := prebuilt/darwin-x86/toolchain/i686-apple-darwin8-4.0.1/bin/gcc
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -12,12 +12,7 @@ ifeq ($(combo_target),HOST_)
|
|||
define get-file-size
|
||||
stat --format "%s" "$(1)"
|
||||
endef
|
||||
|
||||
# Which gcc to use to build qemu, which doesn't work right when
|
||||
# built with 4.2.1 or later.
|
||||
GCCQEMU := prebuilt/linux-x86/toolchain/i686-linux-gnu-3.4.6/bin/gcc
|
||||
endif # _HOST
|
||||
|
||||
endif
|
||||
|
||||
# On the sim, we build the "host" tools in 64 bit iff the compiler
|
||||
# does it for us automatically. In other words, that means on 64 bit
|
||||
|
|
|
@ -575,7 +575,8 @@ droidcore: files \
|
|||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||
$(INSTALLED_RECOVERYIMAGE_TARGET) \
|
||||
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
||||
$(INTERNAL_DEFAULT_DOCS_TARGETS)
|
||||
$(INTERNAL_DEFAULT_DOCS_TARGETS) \
|
||||
$(INSTALLED_FILES_FILE)
|
||||
|
||||
# The actual files built by the droidcore target changes depending
|
||||
# on the build variant.
|
||||
|
|
|
@ -149,6 +149,15 @@ TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)
|
|||
PRODUCT_LOCALES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOCALES))
|
||||
# TODO: also keep track of things like "port", "land" in product files.
|
||||
|
||||
# If CUSTOM_LOCALES contains any locales not already included
|
||||
# in PRODUCT_LOCALES, add them to PRODUCT_LOCALES.
|
||||
extra_locales := $(filter-out $(PRODUCT_LOCALES),$(CUSTOM_LOCALES))
|
||||
ifneq (,$(extra_locales))
|
||||
$(info Adding CUSTOM_LOCALES [$(extra_locales)] to PRODUCT_LOCALES [$(PRODUCT_LOCALES)])
|
||||
PRODUCT_LOCALES += $(extra_locales)
|
||||
extra_locales :=
|
||||
endif
|
||||
|
||||
# Assemble the list of options.
|
||||
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES)
|
||||
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
# Copyright (C) 2009 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.
|
||||
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# Source this file into your environment. Then:
|
||||
#
|
||||
# $ golden_builds sdk-sdk generic-eng generic-userdebug dream-eng
|
||||
#
|
||||
# will build a set of combos. This might take a while. Then you can
|
||||
# go make changes, and run:
|
||||
#
|
||||
# $ check_builds sdk-sdk generic-eng generic-userdebug dream-eng
|
||||
#
|
||||
# Go get dinner, and when you get back, there will be a file
|
||||
# test-builds/sizes.html that has a pretty chart of which files are
|
||||
# in which tree, and how big they are. In that chart, cells for files
|
||||
# that are missing are red, and rows where the file sizes are not all
|
||||
# the same will be blue.
|
||||
#
|
||||
|
||||
TEST_BUILD_DIR=test-builds
|
||||
|
||||
function do_builds
|
||||
{
|
||||
PREFIX=$1
|
||||
shift
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
rm -rf $TEST_BUILD_DIR/$PREFIX-$1
|
||||
make -j6 PRODUCT-$1 dist DIST_DIR=$TEST_BUILD_DIR/$PREFIX-$1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo FAILED
|
||||
return
|
||||
fi
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
function golden_builds
|
||||
{
|
||||
rm -rf $TEST_BUILD_DIR/golden-* $TEST_BUILD_DIR/dist-*
|
||||
do_builds golden "$@"
|
||||
}
|
||||
|
||||
function check_builds
|
||||
{
|
||||
rm -rf $TEST_BUILD_DIR/dist-*
|
||||
do_builds dist "$@"
|
||||
build/tools/compare_fileslist.py \
|
||||
$TEST_BUILD_DIR/golden-*/installed-files.txt \
|
||||
$TEST_BUILD_DIR/dist-*/installed-files.txt \
|
||||
> $TEST_BUILD_DIR/sizes.html
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (C) 2009 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.
|
||||
#
|
||||
|
||||
import cgi, os, string, sys
|
||||
|
||||
def IsDifferent(row):
|
||||
val = None
|
||||
for v in row:
|
||||
if v:
|
||||
if not val:
|
||||
val = v
|
||||
else:
|
||||
if val != v:
|
||||
return True
|
||||
return False
|
||||
|
||||
def main(argv):
|
||||
inputs = argv[1:]
|
||||
data = {}
|
||||
index = 0
|
||||
for input in inputs:
|
||||
f = file(input, "r")
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
lines = map(string.split, lines)
|
||||
lines = map(lambda (x,y): (y,int(x)), lines)
|
||||
for fn,sz in lines:
|
||||
if not data.has_key(fn):
|
||||
data[fn] = {}
|
||||
data[fn][index] = sz
|
||||
index = index + 1
|
||||
rows = []
|
||||
for fn,sizes in data.iteritems():
|
||||
row = [fn]
|
||||
for i in range(0,index):
|
||||
if sizes.has_key(i):
|
||||
row.append(sizes[i])
|
||||
else:
|
||||
row.append(None)
|
||||
rows.append(row)
|
||||
rows = sorted(rows, key=lambda x: x[0])
|
||||
print """<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
.fn, .sz, .z, .d {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.sz, .z, .d {
|
||||
text-align: right;
|
||||
}
|
||||
.fn {
|
||||
background-color: #ffffdd;
|
||||
}
|
||||
.sz {
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
.z {
|
||||
background-color: #ffcccc;
|
||||
}
|
||||
.d {
|
||||
background-color: #99ccff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
"""
|
||||
print "<table>"
|
||||
print "<tr>"
|
||||
for input in inputs:
|
||||
combo = input.split(os.path.sep)[1]
|
||||
print " <td class='fn'>%s</td>" % cgi.escape(combo)
|
||||
print "</tr>"
|
||||
|
||||
for row in rows:
|
||||
print "<tr>"
|
||||
for sz in row[1:]:
|
||||
if not sz:
|
||||
print " <td class='z'> </td>"
|
||||
elif IsDifferent(row[1:]):
|
||||
print " <td class='d'>%d</td>" % sz
|
||||
else:
|
||||
print " <td class='sz'>%d</td>" % sz
|
||||
print " <td class='fn'>%s</td>" % cgi.escape(row[0])
|
||||
print "</tr>"
|
||||
print "</table>"
|
||||
print "</body></html>"
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (C) 2009 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.
|
||||
#
|
||||
|
||||
import os, sys
|
||||
|
||||
def main(argv):
|
||||
output = []
|
||||
roots = argv[1:]
|
||||
for root in roots:
|
||||
base = len(root[:root.rfind(os.path.sep)])
|
||||
for dir, dirs, files in os.walk(root):
|
||||
relative = dir[base:]
|
||||
for f in files:
|
||||
try:
|
||||
row = (
|
||||
os.path.getsize(os.path.sep.join((dir, f))),
|
||||
os.path.sep.join((relative, f)),
|
||||
)
|
||||
output.append(row)
|
||||
except os.error:
|
||||
pass
|
||||
for row in output:
|
||||
print "%12d %s" % row
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
Loading…
Reference in New Issue