• 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

修订版7a508aed2ac3fe64b307cf05df9989e41e7f6630 (tree)
时间2011-02-03 04:52:53
作者Raphael <raphael@goog...>
CommiterRaphael

Log Message

SDK: fix win-sdk build errors, make future errors fatal.

Firs this fixes a cp/rm errors that were logged when building the Windows SDK.
There errors happens because the secondary sdk/tools/patch_windows_sdk.sh
was run twice.

Next the shell script is changed to make any error fatal and actually
break the build, like it should.

In the makefile, merge Ying's fix to correctly pass showcommands.

Change-Id: Iee75e42b0b0bbba3c26858c82c933660dc6d74ae

更改概述

差异

--- a/build/tools/patch_windows_sdk.sh
+++ b/build/tools/patch_windows_sdk.sh
@@ -5,7 +5,8 @@
55 # - development/tools/build/path_windows_sdk.sh to process the
66 # platform-dependent folders and files.
77 # - 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.
910 #
1011 # Input arguments:
1112 # -q = Optional arg to make this silent. Must be given first.
@@ -16,13 +17,17 @@
1617 # $3 = An optional replacement for $TOPDIR (inherited from the Android
1718 # build system), which is the top directory where Android is located.
1819
20+set -e # any error stops the build
21+
1922 # Verbose by default. Use -q to make more silent.
20-V="-v"
23+V=""
2124 Q=""
2225 if [[ "$1" == "-q" ]]; then
2326 Q="$1"
24- V=""
2527 shift
28+else
29+ echo "Win SDK: $0 $*"
30+ set -x # show bash commands; no need for V=-v
2631 fi
2732
2833 TEMP_SDK_DIR=$1
@@ -30,17 +35,16 @@ WIN_OUT_DIR=$2
3035 TOPDIR=${TOPDIR:-$3}
3136
3237 # The unix2dos is provided by the APT package "tofrodos". However
33-# as of ubuntu lucid, the package renamed the command to "todos".
34-UNIX2DOS=`which unix2dos`
38+# as for ubuntu lucid, the package renamed the command to "todos".
39+UNIX2DOS=$(which unix2dos || true)
3540 if [[ ! -x $UNIX2DOS ]]; then
36- UNIX2DOS=`which todos`
41+ UNIX2DOS=$(which todos || true)
3742 fi
3843
3944 PLATFORMS=( $TEMP_SDK_DIR/platforms/* )
4045 if [[ ${#PLATFORMS[@]} != 1 ]]; then
4146 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[@]}"
4448 exit 1
4549 fi
4650
@@ -54,7 +58,6 @@ TOOLS=$TEMP_SDK_DIR/tools
5458 PLATFORM_TOOLS=$TEMP_SDK_DIR/platform-tools
5559 LIB=$TEMP_SDK_DIR/tools/lib
5660 rm $V $TOOLS/{dmtracedump,etc1tool,hprof-conv,sqlite3,zipalign}
57-rm $V $TOOLS/proguard/bin/*.sh
5861 rm $V $LIB/*/swt.jar
5962 rm $V $PLATFORM_TOOLS/{adb,aapt,aidl,dx,dexdump,llvm-rs-cc}
6063
@@ -107,11 +110,8 @@ if [[ -x $UNIX2DOS ]]; then
107110 find $TEMP_SDK_DIR -maxdepth 3 -name "*.bat" -type f -print0 | xargs -0 $UNIX2DOS
108111 fi
109112
110-# Execute the packaging script in the sdk directory
111-${TOPDIR}sdk/build/patch_windows_sdk.sh $Q ${TEMP_SDK_DIR} ${WIN_OUT_DIR} ${TOPDIR}
112-
113-# Just to make it easier on the build servers, we want fastboot and adb (and its DLLs)
114-# next to the new SDK, so up one dir.
113+# Just to make it easier on the build servers, we want fastboot and adb
114+# (and its DLLs) next to the new SDK.
115115 for i in fastboot.exe adb.exe AdbWinApi.dll AdbWinUsbApi.dll; do
116116 cp -f $V $WIN_OUT_DIR/host/windows-x86/bin/$i $TEMP_SDK_DIR/../$i
117117 done
--- a/build/tools/windows_sdk.mk
+++ b/build/tools/windows_sdk.mk
@@ -76,7 +76,7 @@ win_sdk: $(WIN_SDK_ZIP)
7676
7777 winsdk-tools: $(WIN_BUILD_PREREQ)
7878 $(call winsdk-banner,Build Windows Tools)
79- $(hide) USE_MINGW=1 $(MAKE) PRODUCT-$(TARGET_PRODUCT)-$(strip $(WIN_TARGETS))
79+ $(hide) USE_MINGW=1 $(MAKE) PRODUCT-$(TARGET_PRODUCT)-$(strip $(WIN_TARGETS)) $(if $(hide),,showcommands)
8080
8181 $(WIN_SDK_ZIP): winsdk-tools sdk
8282 $(call winsdk-banner,Build $(WIN_SDK_NAME))