Fix download and download_sources to aggressively get all targets

Run any target that depends on download_file, no matter what its
name is. This allows grabbing codemirror without confusing the
__download_bin case with assuming a __download_src target exists.

Change-Id: Iaf7cc3000164aa46376314f8d24dc1f057ab06c3
This commit is contained in:
Shawn Pearce
2013-05-23 10:45:51 -07:00
parent b2249e90f9
commit 3b4ca73c2c
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ genrule(
]), ]),
srcs = [genfile('codemirror-' + VERSION + '.zip')], srcs = [genfile('codemirror-' + VERSION + '.zip')],
deps = [ deps = [
':codemirror__download_bin', ':download',
'//lib:LICENSE-codemirror', '//lib:LICENSE-codemirror',
], ],
out = 'codemirror.jar', out = 'codemirror.jar',
@@ -24,7 +24,7 @@ genrule(
) )
genrule( genrule(
name = 'codemirror__download_bin', name = 'download',
cmd = '${//tools:download_file}' + cmd = '${//tools:download_file}' +
' -o $OUT' + ' -o $OUT' +
' -u ' + URL + ' -u ' + URL +

View File

@@ -18,7 +18,7 @@ import re
from subprocess import check_call, CalledProcessError, Popen, PIPE from subprocess import check_call, CalledProcessError, Popen, PIPE
MAIN = ['//tools/eclipse:classpath'] MAIN = ['//tools/eclipse:classpath']
PAT = re.compile(r'"(//.*?__download_[^"]*)" -> "//tools:download_file"') PAT = re.compile(r'"(//.*?)" -> "//tools:download_file"')
opts = OptionParser() opts = OptionParser()
opts.add_option('--src', action='store_true') opts.add_option('--src', action='store_true')