development
Revision | 04bb65e7c4cd42ce50fa534807c973dba6cb2720 (tree) |
---|---|
Time | 2011-02-03 06:41:24 |
Author | Raphael <raphael@goog...> |
Commiter | Android Code Review |
Merge "SDK: fix win-sdk build errors, make future errors fatal."
@@ -5,7 +5,8 @@ | ||
5 | 5 | # - development/tools/build/path_windows_sdk.sh to process the |
6 | 6 | # platform-dependent folders and files. |
7 | 7 | # - sdk/build/patch_windows_sdk.sh to process folder and files which |
8 | -# depend on the sdk.git repo. This file will be invoked by this one. | |
8 | +# depend on the sdk.git repo. This file is invoked by the makefile | |
9 | +# at development/tools/build/windows_sdk.mk. | |
9 | 10 | # |
10 | 11 | # Input arguments: |
11 | 12 | # -q = Optional arg to make this silent. Must be given first. |
@@ -16,13 +17,17 @@ | ||
16 | 17 | # $3 = An optional replacement for $TOPDIR (inherited from the Android |
17 | 18 | # build system), which is the top directory where Android is located. |
18 | 19 | |
20 | +set -e # any error stops the build | |
21 | + | |
19 | 22 | # Verbose by default. Use -q to make more silent. |
20 | -V="-v" | |
23 | +V="" | |
21 | 24 | Q="" |
22 | 25 | if [[ "$1" == "-q" ]]; then |
23 | 26 | Q="$1" |
24 | - V="" | |
25 | 27 | shift |
28 | +else | |
29 | + echo "Win SDK: $0 $*" | |
30 | + set -x # show bash commands; no need for V=-v | |
26 | 31 | fi |
27 | 32 | |
28 | 33 | TEMP_SDK_DIR=$1 |
@@ -31,16 +36,15 @@ TOPDIR=${TOPDIR:-$3} | ||
31 | 36 | |
32 | 37 | # The unix2dos is provided by the APT package "tofrodos". However |
33 | 38 | # as for ubuntu lucid, the package renamed the command to "todos". |
34 | -UNIX2DOS=`which unix2dos` | |
39 | +UNIX2DOS=$(which unix2dos || true) | |
35 | 40 | if [[ ! -x $UNIX2DOS ]]; then |
36 | - UNIX2DOS=`which todos` | |
41 | + UNIX2DOS=$(which todos || true) | |
37 | 42 | fi |
38 | 43 | |
39 | 44 | PLATFORMS=( $TEMP_SDK_DIR/platforms/* ) |
40 | 45 | if [[ ${#PLATFORMS[@]} != 1 ]]; then |
41 | 46 | echo "Error: Too many platforms found in $TEMP_SDK_DIR" |
42 | - echo "Only one was expected." | |
43 | - echo "Instead, found: ${PLATFORMS[@]}" | |
47 | + echo "Expected one. Instead, found: ${PLATFORMS[@]}" | |
44 | 48 | exit 1 |
45 | 49 | fi |
46 | 50 |
@@ -54,7 +58,6 @@ TOOLS=$TEMP_SDK_DIR/tools | ||
54 | 58 | PLATFORM_TOOLS=$TEMP_SDK_DIR/platform-tools |
55 | 59 | LIB=$TEMP_SDK_DIR/tools/lib |
56 | 60 | rm $V $TOOLS/{dmtracedump,etc1tool,hprof-conv,sqlite3,zipalign} |
57 | -rm $V $TOOLS/proguard/bin/*.sh | |
58 | 61 | rm $V $LIB/*/swt.jar |
59 | 62 | rm $V $PLATFORM_TOOLS/{adb,aapt,aidl,dx,dexdump} |
60 | 63 |
@@ -103,11 +106,8 @@ if [[ -x $UNIX2DOS ]]; then | ||
103 | 106 | find $TEMP_SDK_DIR -maxdepth 3 -name "*.bat" -type f -print0 | xargs -0 $UNIX2DOS |
104 | 107 | fi |
105 | 108 | |
106 | -# Execute the packaging script in the sdk directory | |
107 | -${TOPDIR}sdk/build/patch_windows_sdk.sh $Q ${TEMP_SDK_DIR} ${WIN_OUT_DIR} ${TOPDIR} | |
108 | - | |
109 | -# Just to make it easier on the build servers, we want fastboot and adb (and its DLLs) | |
110 | -# next to the new SDK, so up one dir. | |
109 | +# Just to make it easier on the build servers, we want fastboot and adb | |
110 | +# (and its DLLs) next to the new SDK. | |
111 | 111 | for i in fastboot.exe adb.exe AdbWinApi.dll AdbWinUsbApi.dll; do |
112 | 112 | cp -f $V $WIN_OUT_DIR/host/windows-x86/bin/$i $TEMP_SDK_DIR/../$i |
113 | 113 | done |
@@ -62,7 +62,7 @@ win_sdk: $(WIN_SDK_ZIP) | ||
62 | 62 | |
63 | 63 | winsdk-tools: acp |
64 | 64 | $(call winsdk-banner,Build Windows Tools) |
65 | - $(hide) USE_MINGW=1 $(MAKE) PRODUCT-$(TARGET_PRODUCT)-$(strip $(WIN_TARGETS)) | |
65 | + $(hide) USE_MINGW=1 $(MAKE) PRODUCT-$(TARGET_PRODUCT)-$(strip $(WIN_TARGETS)) $(if $(hide),,showcommands) | |
66 | 66 | |
67 | 67 | $(WIN_SDK_ZIP): winsdk-tools sdk |
68 | 68 | $(call winsdk-banner,Build $(WIN_SDK_NAME)) |