summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 15:05:08 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 15:05:08 +0000
commit5a5ad998d56dce29a2431b4b77a8369b46ad4ca9 (patch)
treee1106fe8bdb573a187df2d2b03fd5e10bd691cb6 /chrome
parent9e5e57a48a2cf288e13f33d197c60485bceb348a (diff)
downloadchromium_src-5a5ad998d56dce29a2431b4b77a8369b46ad4ca9.zip
chromium_src-5a5ad998d56dce29a2431b4b77a8369b46ad4ca9.tar.gz
chromium_src-5a5ad998d56dce29a2431b4b77a8369b46ad4ca9.tar.bz2
check datestamps before blindly re-generating .h
Review URL: http://codereview.chromium.org/17265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/chrome.xcodeproj/generate_headers.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/chrome/chrome.xcodeproj/generate_headers.sh b/chrome/chrome.xcodeproj/generate_headers.sh
index b7921f1..f656be2 100755
--- a/chrome/chrome.xcodeproj/generate_headers.sh
+++ b/chrome/chrome.xcodeproj/generate_headers.sh
@@ -9,10 +9,22 @@ GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated"
GRIT_DIR="${GENERATED_DIR}/grit"
mkdir -p "${GRIT_DIR}"
-python "${PROJECT_DIR}/../tools/grit/grit.py" \
- -i "${PROJECT_DIR}/app/generated_resources.grd" build \
- -o "${GRIT_DIR}"
+# compare generated_resources.grd to generated_resources.h. If the .h is
+# older or doesn't exist, rebuild it.
+if [ "${GRIT_DIR}/generated_resources.h" -ot \
+ "${PROJECT_DIR}/app/generated_resources.grd" ]
+then
+ python "${PROJECT_DIR}/../tools/grit/grit.py" \
+ -i "${PROJECT_DIR}/app/generated_resources.grd" build \
+ -o "${GRIT_DIR}"
+fi
-python "${PROJECT_DIR}/../tools/grit/grit.py" \
- -i "${PROJECT_DIR}/app/chromium_strings.grd" build \
- -o "${GRIT_DIR}"
+# compare chromium_strings.grd to chromium_strings.h. If the .h is
+# older or doesn't exist, rebuild it
+if [ "${GRIT_DIR}/chromium_strings.h" -ot \
+ "${PROJECT_DIR}/app/chromium_strings.grd" ]
+then
+ python "${PROJECT_DIR}/../tools/grit/grit.py" \
+ -i "${PROJECT_DIR}/app/chromium_strings.grd" build \
+ -o "${GRIT_DIR}"
+fi