• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

development


Commit MetaInfo

Revisioncedf2ba81879e658b66c9023ec313c0681a819a7 (tree)
Zeit2011-02-03 04:35:41
AutorRaphael <raphael@goog...>
CommiterRaphael Moll

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: I97bbe46d705c6683e31bb701222efe6f9da71d70

Ändern Zusammenfassung

Diff

--- 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
@@ -31,16 +36,15 @@ TOPDIR=${TOPDIR:-$3}
3136
3237 # The unix2dos is provided by the APT package "tofrodos". However
3338 # as for ubuntu lucid, the package renamed the command to "todos".
34-UNIX2DOS=`which unix2dos`
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}
6063
@@ -103,11 +106,8 @@ if [[ -x $UNIX2DOS ]]; then
103106 find $TEMP_SDK_DIR -maxdepth 3 -name "*.bat" -type f -print0 | xargs -0 $UNIX2DOS
104107 fi
105108
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.
111111 for i in fastboot.exe adb.exe AdbWinApi.dll AdbWinUsbApi.dll; do
112112 cp -f $V $WIN_OUT_DIR/host/windows-x86/bin/$i $TEMP_SDK_DIR/../$i
113113 done
--- a/build/tools/windows_sdk.mk
+++ b/build/tools/windows_sdk.mk
@@ -62,7 +62,7 @@ win_sdk: $(WIN_SDK_ZIP)
6262
6363 winsdk-tools: acp
6464 $(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)
6666
6767 $(WIN_SDK_ZIP): winsdk-tools sdk
6868 $(call winsdk-banner,Build $(WIN_SDK_NAME))