| Index: src/scripts/build_platform_packages.sh
|
| diff --git a/src/scripts/build_platform_packages.sh b/src/scripts/build_platform_packages.sh
|
| index 5ce38d81952e4cbca3cd271d4509f91b5ca711b0..d0b10cfdffdd9d0480f5d49df321b29c102dbd7c 100755
|
| --- a/src/scripts/build_platform_packages.sh
|
| +++ b/src/scripts/build_platform_packages.sh
|
| @@ -13,9 +13,13 @@ assert_not_root_user
|
|
|
| # Flags
|
| DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser."
|
| +DEFINE_boolean new_build $FLAGS_FALSE "Use chromiumos-build."
|
| +DEFINE_string architecture i386 "The architecture to build for (--new_build only)." a
|
|
|
| -# Parse command line
|
| -FLAGS "$@" || exit 1
|
| +# Fix up the command line and parse with shflags.
|
| +FIXED_FLAGS="$@"
|
| +FIXED_FLAGS=${FIXED_FLAGS/new-build/new_build}
|
| +FLAGS $FIXED_FLAGS || exit 1
|
| eval set -- "${FLAGS_ARGV}"
|
|
|
| # Die on error
|
| @@ -47,40 +51,50 @@ then
|
| export GET_STABLE_CHROME=1
|
| fi
|
|
|
| -# Build dh-chromeos really first. Some of third_party needs it.
|
| -echo "Building package dh-chromeos..."
|
| -cd "$PLATFORM_DIR/dh-chromeos"
|
| -./make_pkg.sh
|
| -cd -
|
| -
|
| -# Build third_party packages first, since packages and libs depend on them.
|
| -for i in $THIRD_PARTY_PACKAGES
|
| -do
|
| - echo "Building package ${i}..."
|
| - cd "$THIRD_PARTY_DIR/$i"
|
| +if [ $FLAGS_new_build -eq $FLAGS_TRUE ]; then
|
| + # chromiumos-build works out the build order for itself.
|
| + PACKAGES='dh-chromeos libchrome libchromeos'
|
| + for PKG in $PLATFORM_DIRS $THIRD_PARTY_PACKAGES; do
|
| + PACKAGES="$PACKAGES ${PKG%/*}"
|
| + done
|
| + echo chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES
|
| + chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES
|
| +else
|
| + # Build dh-chromeos really first. Some of third_party needs it.
|
| + echo "Building package dh-chromeos..."
|
| + cd "$PLATFORM_DIR/dh-chromeos"
|
| ./make_pkg.sh
|
| cd -
|
| -done
|
| -
|
| -# Build base lib next, since packages depend on it.
|
| -echo "Building base library..."
|
| -cd "$THIRD_PARTY_DIR/chrome"
|
| -./make_pkg.sh
|
| -cd -
|
| -
|
| -#Build common lib next.
|
| -echo "Building common library..."
|
| -cd "$SRC_ROOT/common"
|
| -./make_pkg.sh
|
| -cd -
|
| -
|
| -# Build platform packages
|
| -for i in $PLATFORM_DIRS
|
| -do
|
| - echo "Building package ${i}..."
|
| - cd "$PLATFORM_DIR/$i"
|
| +
|
| + # Build third_party packages first, since packages and libs depend on them.
|
| + for i in $THIRD_PARTY_PACKAGES
|
| + do
|
| + echo "Building package ${i}..."
|
| + cd "$THIRD_PARTY_DIR/$i"
|
| + ./make_pkg.sh
|
| + cd -
|
| + done
|
| +
|
| + # Build base lib next, since packages depend on it.
|
| + echo "Building base library..."
|
| + cd "$THIRD_PARTY_DIR/chrome"
|
| + ./make_pkg.sh
|
| + cd -
|
| +
|
| + #Build common lib next.
|
| + echo "Building common library..."
|
| + cd "$SRC_ROOT/common"
|
| ./make_pkg.sh
|
| cd -
|
| -done
|
| +
|
| + # Build platform packages
|
| + for i in $PLATFORM_DIRS
|
| + do
|
| + echo "Building package ${i}..."
|
| + cd "$PLATFORM_DIR/$i"
|
| + ./make_pkg.sh
|
| + cd -
|
| + done
|
| +fi
|
|
|
| echo "All packages built."
|
|
|