diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-11 13:40:35 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-11 13:40:35 +0000 |
commit | de3fc16ada24cbb04303b85286b5cbc2df6c7d0e (patch) | |
tree | 16fc05e176d6d9a3fe2a7b0a783e64f7f18e0019 /build/v8.xcodeproj | |
parent | f47e22a2507faa7cdb0d048f6e03e952e1f8f814 (diff) | |
download | chromium_src-de3fc16ada24cbb04303b85286b5cbc2df6c7d0e.zip chromium_src-de3fc16ada24cbb04303b85286b5cbc2df6c7d0e.tar.gz chromium_src-de3fc16ada24cbb04303b85286b5cbc2df6c7d0e.tar.bz2 |
Put all prebuild scripts in external files. Scripts to run unit tests are
staying put for now, because they're all trivial and identical.
Review URL: http://codereview.chromium.org/1925
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/v8.xcodeproj')
-rw-r--r-- | build/v8.xcodeproj/project.pbxproj | 8 | ||||
-rwxr-xr-x | build/v8.xcodeproj/v8_prebuild.sh | 59 |
2 files changed, 64 insertions, 3 deletions
diff --git a/build/v8.xcodeproj/project.pbxproj b/build/v8.xcodeproj/project.pbxproj index 92e40e7..4634dc4 100644 --- a/build/v8.xcodeproj/project.pbxproj +++ b/build/v8.xcodeproj/project.pbxproj @@ -721,7 +721,7 @@ isa = PBXNativeTarget; buildConfigurationList = 8970F2F70E719FC1006AE7B5 /* Build configuration list for PBXNativeTarget "v8" */; buildPhases = ( - 89EA6FB50E71AA1F00F59E1B /* ShellScript */, + 89EA6FB50E71AA1F00F59E1B /* Pre-Build */, 8970F2ED0E719FB2006AE7B5 /* Sources */, 8970F2EE0E719FB2006AE7B5 /* Frameworks */, ); @@ -790,18 +790,20 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - 89EA6FB50E71AA1F00F59E1B /* ShellScript */ = { + 89EA6FB50E71AA1F00F59E1B /* Pre-Build */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Pre-Build"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -ex\nJS_FILES=\"runtime.js\"\\\n\" v8natives.js\"\\\n\" array.js\"\\\n\" string.js\"\\\n\" uri.js\"\\\n\" math.js\"\\\n\" messages.js\"\\\n\" apinatives.js\"\\\n\" debug-delay.js\"\\\n\" mirror-delay.js\"\\\n\" date-delay.js\"\\\n\" regexp-delay.js\"\\\n\" macros.py\"\n\nV8ROOT=\"${SRCROOT}/../v8\"\n\nSRC_DIR=\"${V8ROOT}/src\"\n\nNATIVE_JS_FILES=\"\"\n\nfor i in ${JS_FILES} ; do\n NATIVE_JS_FILES+=\"${SRC_DIR}/${i} \"\ndone\n\nV8_GENERATED_SOURCES_DIR=\"${CONFIGURATION_TEMP_DIR}/generated\"\nmkdir -p \"${V8_GENERATED_SOURCES_DIR}\"\n\nLIBRARIES_CC=\"${V8_GENERATED_SOURCES_DIR}/libraries.cc\"\nLIBRARIES_EMPTY_CC=\"${V8_GENERATED_SOURCES_DIR}/libraries-empty.cc\"\n\npython \"${V8ROOT}/tools/js2c.py\" \\\n \"${LIBRARIES_CC}.new\" \\\n \"${LIBRARIES_EMPTY_CC}.new\" \\\n ${NATIVE_JS_FILES}\n\n# Only use the new files if they're different from the existing files (if any),\n# preserving the existing files' timestamps when there are no changes. This\n# minimizes unnecessary build activity for a no-change build.\n\nif ! diff -q \"${LIBRARIES_CC}.new\" \"${LIBRARIES_CC}\" >& /dev/null ; then\n mv \"${LIBRARIES_CC}.new\" \"${LIBRARIES_CC}\"\nelse\n rm \"${LIBRARIES_CC}.new\"\nfi\n\nif ! diff -q \"${LIBRARIES_EMPTY_CC}.new\" \"${LIBRARIES_EMPTY_CC}\" >& /dev/null ; then\n mv \"${LIBRARIES_EMPTY_CC}.new\" \"${LIBRARIES_EMPTY_CC}\"\nelse\n rm \"${LIBRARIES_EMPTY_CC}.new\"\nfi\n"; + shellScript = "set -ex\nexec \"${PROJECT_FILE_PATH}/${PRODUCT_NAME}_prebuild.sh\" \"${@}\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/build/v8.xcodeproj/v8_prebuild.sh b/build/v8.xcodeproj/v8_prebuild.sh new file mode 100755 index 0000000..c61e01c --- /dev/null +++ b/build/v8.xcodeproj/v8_prebuild.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# Copyright (c) 2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -ex +JS_FILES="runtime.js \ + v8natives.js \ + array.js \ + string.js \ + uri.js \ + math.js \ + messages.js \ + apinatives.js \ + debug-delay.js \ + mirror-delay.js \ + date-delay.js \ + regexp-delay.js \ + macros.py" + +V8ROOT="${SRCROOT}/../v8" + +SRC_DIR="${V8ROOT}/src" + +NATIVE_JS_FILES="" + +for i in ${JS_FILES} ; do + NATIVE_JS_FILES+="${SRC_DIR}/${i} " +done + +V8_GENERATED_SOURCES_DIR="${CONFIGURATION_TEMP_DIR}/generated" +mkdir -p "${V8_GENERATED_SOURCES_DIR}" + +LIBRARIES_CC="${V8_GENERATED_SOURCES_DIR}/libraries.cc" +LIBRARIES_EMPTY_CC="${V8_GENERATED_SOURCES_DIR}/libraries-empty.cc" + +python "${V8ROOT}/tools/js2c.py" \ + "${LIBRARIES_CC}.new" \ + "${LIBRARIES_EMPTY_CC}.new" \ + ${NATIVE_JS_FILES} + +# Only use the new files if they're different from the existing files (if any), +# preserving the existing files' timestamps when there are no changes. This +# minimizes unnecessary build activity for a no-change build. + +if ! diff -q "${LIBRARIES_CC}.new" "${LIBRARIES_CC}" >& /dev/null +then + mv "${LIBRARIES_CC}.new" "${LIBRARIES_CC}" +else + rm "${LIBRARIES_CC}.new" +fi + +if ! diff -q "${LIBRARIES_EMPTY_CC}.new" "${LIBRARIES_EMPTY_CC}" >& /dev/null +then + mv "${LIBRARIES_EMPTY_CC}.new" "${LIBRARIES_EMPTY_CC}" +else + rm "${LIBRARIES_EMPTY_CC}.new" +fi |