Simplify buck build eclipse by removing $OUT and $DEPS
It does not appear to be necessary to include either $OUT or $DEPS in the command line when building the project and classpath files for Eclipse. Omit these as $DEPS is starting to be deprecated by Buck and will eventually disappear. Change-Id: I40f9a357dfa8114efaf0212bd1ff4cb51197b67f
This commit is contained in:
parent
abb43dd89f
commit
71ab2f0f63
@ -38,26 +38,26 @@ java_library(
|
|||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = '_project',
|
name = '_project',
|
||||||
cmd = '$(exe :gen_project) $OUT',
|
cmd = '$(exe :gen_project)',
|
||||||
deps = [':gen_project'],
|
deps = [':gen_project'],
|
||||||
out = 'project',
|
out = '__fake.project__',
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = '_classpath',
|
name = '_classpath',
|
||||||
cmd = '$(exe :gen_classpath) $OUT $DEPS',
|
cmd = '$(exe :gen_classpath)',
|
||||||
deps = [
|
deps = [
|
||||||
':classpath',
|
':classpath',
|
||||||
':gen_classpath',
|
':gen_classpath',
|
||||||
],
|
],
|
||||||
out = 'classpath',
|
out = '__fake.classpath__',
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = '_classpath_nocompile',
|
name = '_classpath_nocompile',
|
||||||
cmd = '$(exe :gen_classpath)',
|
cmd = '$(exe :gen_classpath)',
|
||||||
deps = [':gen_classpath'],
|
deps = [':gen_classpath'],
|
||||||
out = '__fake.eclipse__',
|
out = '__fake.classpath__',
|
||||||
)
|
)
|
||||||
|
|
||||||
python_binary(
|
python_binary(
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
#
|
#
|
||||||
# TODO(sop): Remove hack after Buck supports Eclipse
|
# TODO(sop): Remove hack after Buck supports Eclipse
|
||||||
|
|
||||||
from os import path, symlink
|
from os import path
|
||||||
import re
|
import re
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
|
|
||||||
OUT = argv[1] if len(argv) >= 2 else None
|
|
||||||
ROOT = path.abspath(__file__)
|
ROOT = path.abspath(__file__)
|
||||||
for _ in range(0, 3):
|
for _ in range(0, 3):
|
||||||
ROOT = path.dirname(ROOT)
|
ROOT = path.dirname(ROOT)
|
||||||
@ -117,5 +116,3 @@ classpathentry('output', 'buck-out/classes')
|
|||||||
p = path.join(ROOT, '.classpath')
|
p = path.join(ROOT, '.classpath')
|
||||||
with open(p, 'w') as fd:
|
with open(p, 'w') as fd:
|
||||||
doc.writexml(fd, addindent = ' ', newl = '\n', encoding='UTF-8')
|
doc.writexml(fd, addindent = ' ', newl = '\n', encoding='UTF-8')
|
||||||
if OUT:
|
|
||||||
symlink(p, OUT)
|
|
||||||
|
@ -17,10 +17,9 @@
|
|||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
from os import path, symlink
|
from os import path
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
|
||||||
OUT = argv[1]
|
|
||||||
ROOT = path.abspath(__file__)
|
ROOT = path.abspath(__file__)
|
||||||
for _ in range(0, 3):
|
for _ in range(0, 3):
|
||||||
ROOT = path.dirname(ROOT)
|
ROOT = path.dirname(ROOT)
|
||||||
@ -41,4 +40,3 @@ with open(p, 'w') as fd:
|
|||||||
</natures>
|
</natures>
|
||||||
</projectDescription>\
|
</projectDescription>\
|
||||||
""", file=fd)
|
""", file=fd)
|
||||||
symlink(p, OUT)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user