@@ -192,13 +192,13 @@ def build_lint_src_timestamp(t):
|
|||||||
limited_doc_files = [path
|
limited_doc_files = [path
|
||||||
for path in ifind('externs', 'build/src/external/externs')
|
for path in ifind('externs', 'build/src/external/externs')
|
||||||
if path.endswith('.js')]
|
if path.endswith('.js')]
|
||||||
t.run('%(GJSLINT)s', '--strict', '--limited_doc_files=%s' % (','.join(limited_doc_files),), SRC, INTERNAL_SRC, EXTERNAL_SRC, EXAMPLES_SRC)
|
t.run('%(GJSLINT)s', '--strict', '--limited_doc_files=%s' % (','.join(limited_doc_files),), t.newer(SRC, INTERNAL_SRC, EXTERNAL_SRC, EXAMPLES_SRC))
|
||||||
t.touch()
|
t.touch()
|
||||||
|
|
||||||
|
|
||||||
@target('build/lint-spec-timestamp', SPEC)
|
@target('build/lint-spec-timestamp', SPEC)
|
||||||
def build_lint_spec_timestamp(t):
|
def build_lint_spec_timestamp(t):
|
||||||
t.run('%(GJSLINT)s', SPEC)
|
t.run('%(GJSLINT)s', t.newer(SPEC))
|
||||||
t.touch()
|
t.touch()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -152,9 +152,7 @@ class Target(object):
|
|||||||
content = urllib2.urlopen(url).read()
|
content = urllib2.urlopen(url).read()
|
||||||
if md5 and hashlib.md5(content).hexdigest() != md5:
|
if md5 and hashlib.md5(content).hexdigest() != md5:
|
||||||
raise BuildError(self, 'corrupt download')
|
raise BuildError(self, 'corrupt download')
|
||||||
# FIXME Python on Windoze corrupts the content when writing it
|
with open(self.name, 'wb') as f:
|
||||||
# FIXME probably something to do with encodings
|
|
||||||
with open(self.name, 'w') as f:
|
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
def error(self, message):
|
def error(self, message):
|
||||||
@@ -178,6 +176,10 @@ class Target(object):
|
|||||||
self.info('mkdir -p %s', path)
|
self.info('mkdir -p %s', path)
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
|
|
||||||
|
def newer(self, *args):
|
||||||
|
args = flatten_expand_list(args)
|
||||||
|
return [arg for arg in args if targets.get(arg).timestamp > self.timestamp]
|
||||||
|
|
||||||
def output(self, *args, **kwargs):
|
def output(self, *args, **kwargs):
|
||||||
args = flatten_expand_list(args)
|
args = flatten_expand_list(args)
|
||||||
self.info(' '.join(args))
|
self.info(' '.join(args))
|
||||||
|
|||||||
Reference in New Issue
Block a user