gerrit/BUCK
David Ostrovsky ce76802d5c Buck: Simplify build rules
Since [1] dependencies to targets used in $(location //path/to:target)
macro are added implicitly.

This can be verified by using Bucks audit and targets commands:

  $ buck targets --json api
  [...]
  "buck.type" : "genrule",
  "name" : "api",
  "deps" : [ ],
  [...]

So explicit dependencies are empty, but implicit dependencies are still
present:

  $ buck audit dependencies api
  //gerrit-extension-api:extension-api
  //gerrit-extension-api:extension-api-javadoc
  //gerrit-extension-api:extension-api-src
  //gerrit-plugin-api:plugin-api
  //gerrit-plugin-api:plugin-api-javadoc
  //gerrit-plugin-api:plugin-api-src
  //gerrit-plugin-gwtui:gwtui-api
  //gerrit-plugin-gwtui:gwtui-api-javadoc
  //gerrit-plugin-gwtui:gwtui-api-src

[1] https://github.com/facebook/buck/issues/128

Change-Id: I6c8ddb40ef95ee45f6b6605e74381d55524229af
2015-06-17 21:42:42 +02:00

41 lines
1.1 KiB
Python

include_defs('//tools/build.defs')
gerrit_war(name = 'gerrit')
gerrit_war(name = 'headless', ui = None)
gerrit_war(name = 'chrome', ui = 'ui_chrome')
gerrit_war(name = 'firefox', ui = 'ui_firefox')
gerrit_war(name = 'safari', ui = 'ui_safari')
gerrit_war(name = 'withdocs', docs = True)
gerrit_war(name = 'release', ui = 'ui_optdbg_r', docs = True, context = ['//plugins:core'], visibility = ['//tools/maven:'])
API_DEPS = [
'//gerrit-extension-api:extension-api',
'//gerrit-extension-api:extension-api-src',
'//gerrit-extension-api:extension-api-javadoc',
'//gerrit-plugin-api:plugin-api',
'//gerrit-plugin-api:plugin-api-src',
'//gerrit-plugin-api:plugin-api-javadoc',
'//gerrit-plugin-gwtui:gwtui-api',
'//gerrit-plugin-gwtui:gwtui-api-src',
'//gerrit-plugin-gwtui:gwtui-api-javadoc',
]
genrule(
name = 'api',
cmd = ';'.join(
['cd $TMP'] +
['ln -s $(location %s) .' % n for n in API_DEPS] +
['zip -q0 $OUT *']),
out = 'api.zip',
)
genrule(
name = 'all',
cmd = 'echo done >$OUT',
deps = [
':api',
':release',
],
out = '__fake.all__',
)