Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3099)

Unified Diff: build/android/gyp/dex.py

Issue 13432002: Add input content checking to some build scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/gyp/dex.py
diff --git a/build/android/dex.py b/build/android/gyp/dex.py
similarity index 71%
rename from build/android/dex.py
rename to build/android/gyp/dex.py
index 00c2c527422bc96788ad7f2e8d0f8f1910fb46e8..69d3d96ac29d0b00e58c905cf276104edf9cab4d 100755
--- a/build/android/dex.py
+++ b/build/android/gyp/dex.py
@@ -9,13 +9,26 @@ import optparse
import os
import sys
+from util import md5_check
+
+BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
+sys.path.append(BUILD_ANDROID_DIR)
+
from pylib import build_utils
Yaron 2013/04/03 22:05:35 Is build_utils moving to the gyp dir in another pa
cjhopman 2013/04/03 22:17:56 Yes.
def DoDex(options, paths):
dx_binary = os.path.join(options.android_sdk_root, 'platform-tools', 'dx')
dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths
- build_utils.CheckCallDie(dex_cmd)
+
+ md5_stamp = '%s.md5' % options.dex_path
+ md5_checker = md5_check.Md5Checker(
+ stamp=md5_stamp, inputs=paths, command=dex_cmd)
+ if md5_checker.IsStale():
+ build_utils.CheckCallDie(dex_cmd)
+ else:
+ build_utils.Touch(options.dex_path)
+ md5_checker.Write()
def main(argv):
« no previous file with comments | « build/android/dex.py ('k') | build/android/gyp/jar.py » ('j') | build/android/gyp/javac.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698