blob: 1ba5e0cbea9a4af416debdb0fc980164595d2c89 [file] [log] [blame]
import os
import sys
d = os.getcwd()
while not os.path.lexists(os.path.join(d, '.buckversion')):
d = os.path.dirname(d)
bd = os.path.join(d, 'bucklets')
if not os.path.isdir(bd) or not os.listdir(bd):
sys.stderr.write(('Bucklets directory is missing or empty: %s\n'
'Run `git submodule update --init`') % bd)
sys.exit(1)
bucklets = [
'java_doc.bucklet',
'java_sources.bucklet',
'maven_jar.bucklet',
'maven_package.bucklet',
'war.bucklet',
]
for bucklet in bucklets:
path = os.path.join(bd, bucklet)
if not os.path.isfile(path):
sys.stderr.write('Missing bucklet: %s\n' % path)
sys.exit(1)
include_defs('//bucklets/%s' % bucklet)