Remove unnecessary reference to $SRCDIR in Buck genrules
In new buck version `$SRCDIR` is not necessary any more. Buck now always runs genrule relative to the $SRCDIR link forest. Change-Id: Iee88bb575c7baa62bc087527927be5347a7f8f95
This commit is contained in:
parent
1ec7f1b55f
commit
3f3e9ad20c
@ -23,7 +23,6 @@ def genasciidoc(
|
||||
EXPN = '.expn'
|
||||
|
||||
asciidoc = [
|
||||
'cd $SRCDIR;',
|
||||
'$(exe //lib/asciidoctor:asciidoc)',
|
||||
'-z', '$OUT',
|
||||
'--tmp', '$TMP',
|
||||
@ -49,7 +48,7 @@ def genasciidoc(
|
||||
genrule(
|
||||
name = ex,
|
||||
cmd = '$(exe :replace_macros) --suffix=' + EXPN +
|
||||
' -s $SRCDIR/%s' % fn +
|
||||
' -s %s' % fn +
|
||||
' -o $OUT',
|
||||
srcs = [src],
|
||||
deps = tx + [':replace_macros'],
|
||||
|
@ -48,7 +48,7 @@ java_doc(
|
||||
name = 'extension-api-javadoc',
|
||||
title = 'Gerrit Review Extension API Documentation',
|
||||
pkg = 'com.google.gerrit.extensions',
|
||||
paths = ['$SRCDIR/src/main/java'],
|
||||
paths = ['src/main/java'],
|
||||
srcs = SRCS,
|
||||
deps = [
|
||||
'//lib/guice:javax-inject',
|
||||
|
@ -59,4 +59,5 @@ java_doc(
|
||||
'//lib/bouncycastle:bcpg',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
do_it_wrong = True,
|
||||
)
|
||||
|
@ -51,7 +51,7 @@ java_doc(
|
||||
name = 'gwtui-api-javadoc',
|
||||
title = 'Gerrit Review GWT Extension API Documentation',
|
||||
pkg = 'com.google.gerrit',
|
||||
paths = ['$SRCDIR/src/main/java'] + COMMON,
|
||||
paths = ['src/main/java'] + COMMON,
|
||||
srcs = SRCS + glob(COMMON),
|
||||
deps = DEPS + ['//gerrit-gwtui-common:client-src-lib'],
|
||||
visibility = ['PUBLIC'],
|
||||
|
@ -33,7 +33,7 @@ java_library2(
|
||||
|
||||
genrule(
|
||||
name = 'webapp_assets',
|
||||
cmd = 'cd $SRCDIR/src/main/webapp; zip -qr $OUT .',
|
||||
cmd = 'cd src/main/webapp; zip -qr $OUT .',
|
||||
srcs = glob(['src/main/webapp/**/*']),
|
||||
deps = [],
|
||||
out = 'webapp_assets.zip',
|
||||
@ -42,7 +42,7 @@ genrule(
|
||||
|
||||
genrule(
|
||||
name = 'log4j-config__jar',
|
||||
cmd = 'jar cf $OUT -C $SRCDIR/src/main/resources .',
|
||||
cmd = 'jar cf $OUT -C src/main/resources .',
|
||||
srcs = ['src/main/resources/log4j.properties'],
|
||||
out = 'log4j-config.jar',
|
||||
)
|
||||
|
@ -13,10 +13,10 @@ genrule(
|
||||
cmd = ';'.join([
|
||||
':>$OUT',
|
||||
"echo '/** @license' >>$OUT",
|
||||
'unzip -p $SRCDIR/%s %s/LICENSE >>$OUT' % (ZIP, TOP),
|
||||
'unzip -p %s %s/LICENSE >>$OUT' % (ZIP, TOP),
|
||||
"echo '*/' >>$OUT",
|
||||
] +
|
||||
['unzip -p $SRCDIR/%s %s/%s >>$OUT' % (ZIP, TOP, n)
|
||||
['unzip -p %s %s/%s >>$OUT' % (ZIP, TOP, n)
|
||||
for n in CM3_CSS + CM3_THEMES]
|
||||
),
|
||||
srcs = [genfile(ZIP)],
|
||||
@ -30,10 +30,10 @@ genrule(
|
||||
cmd = ';'.join([
|
||||
':>$OUT',
|
||||
"echo '/** @license' >>$OUT",
|
||||
'unzip -p $SRCDIR/%s %s/LICENSE >>$OUT' % (ZIP, TOP),
|
||||
'unzip -p %s %s/LICENSE >>$OUT' % (ZIP, TOP),
|
||||
"echo '*/' >>$OUT",
|
||||
] +
|
||||
['unzip -p $SRCDIR/%s %s/%s >>$OUT' % (ZIP, TOP, n)
|
||||
['unzip -p %s %s/%s >>$OUT' % (ZIP, TOP, n)
|
||||
for n in CM3_JS]
|
||||
),
|
||||
srcs = [genfile(ZIP)],
|
||||
|
@ -19,7 +19,7 @@ def prolog_cafe_library(
|
||||
visibility = []):
|
||||
genrule(
|
||||
name = name + '__pl2j',
|
||||
cmd = 'cd $SRCDIR;$(exe //lib/prolog:compiler)' +
|
||||
cmd = '$(exe //lib/prolog:compiler)' +
|
||||
' $TMP $OUT ' +
|
||||
' '.join(srcs),
|
||||
srcs = srcs,
|
||||
|
@ -225,8 +225,13 @@ def java_doc(
|
||||
paths,
|
||||
srcs = [],
|
||||
deps = [],
|
||||
visibility = []
|
||||
visibility = [],
|
||||
do_it_wrong = False,
|
||||
):
|
||||
if do_it_wrong:
|
||||
sourcepath = paths
|
||||
else:
|
||||
sourcepath = ['$SRCDIR/' + n for n in paths]
|
||||
genrule(
|
||||
name = name,
|
||||
cmd = ' '.join([
|
||||
@ -241,7 +246,7 @@ def java_doc(
|
||||
'-link http://docs.oracle.com/javase/7/docs/api',
|
||||
'-subpackages ' + pkg,
|
||||
'-sourcepath ',
|
||||
':'.join([n for n in paths]),
|
||||
':'.join(sourcepath),
|
||||
' -classpath ',
|
||||
':'.join(['$(location %s)' % n for n in deps]),
|
||||
'-d $TMP',
|
||||
|
Loading…
Reference in New Issue
Block a user