Buck: Remove usage of genfile()

genfile() is considered to be deprecated and is going to be discontinued
in future Buck releases [1].

[1] https://groups.google.com/forum/#!topic/buck-build/Ci8Y95USD8I

Change-Id: I7a5a1ee99d1448c412bb51b793c1e874dd3c62f4
This commit is contained in:
David Ostrovsky
2014-05-30 12:42:32 +02:00
committed by David Ostrovsky
parent a607a784e3
commit d8af092c0a
13 changed files with 88 additions and 112 deletions

View File

@@ -14,12 +14,8 @@
# These definitions support building a runnable version of Gerrit.
DOCS_SRC = genfile('Documentation/html.zip')
DOCS_HTML = '//Documentation:html'
DOCS_LIB = '//Documentation:index_lib'
DOCS_DEP = [
'//Documentation:html',
'//Documentation:index_lib',
]
LIBS = [
'//gerrit-war:log4j-config',
'//gerrit-war:init',
@@ -50,23 +46,20 @@ def war(
for l in pgmlibs:
cmd.extend(['--pgmlib', l])
src = []
dep = []
if docs:
src.append(DOCS_SRC)
dep.extend(DOCS_DEP)
cmd.append('$(location %s)' % DOCS_HTML)
dep.append(DOCS_HTML)
dep.append(DOCS_LIB)
cmd.extend(['--lib', DOCS_LIB])
if context:
for t in context:
dep.append(t)
cmd.append('$(location %s)' % t)
if src:
cmd.append('$SRCS')
genrule(
name = name,
cmd = ' '.join(cmd),
srcs = src,
deps = libs + pgmlibs + dep + ['//tools:pack_war'],
out = name + '.war',
visibility = visibility,

View File

@@ -110,8 +110,7 @@ def gerrit_plugin(
if gwt_module:
prebuilt_jar(
name = '%s-static-jar' % name,
binary_jar = genfile('%s-static.zip' % name),
deps = [':%s-static' % name],
binary_jar = ':%s-static' % name,
)
genrule(
name = '%s-static' % name,
@@ -120,8 +119,8 @@ def gerrit_plugin(
':%s__gwt_application' % name +
';cd $TMP' +
';zip -qr $OUT .',
deps = [':%s__gwt_application' % name],
out = '%s-static.zip' % name,
deps = [':%s__gwt_application' % name]
)
gwt_binary(
name = name + '__gwt_application',
@@ -136,7 +135,7 @@ def gerrit_plugin(
java_binary(
name = name,
manifest_file = genfile('MANIFEST.MF'),
manifest_file = ':%s__manifest' % name,
deps = [
':%s__plugin' % name,
':%s__manifest' % name,