tracing: Add traces for Cassandra
[reddit.git] / r2 / Makefile.py
blobc7ecaff41b0c30ee1fbed4641df15f3b142ba969
1 # The contents of this file are subject to the Common Public Attribution
2 # License Version 1.0. (the "License"); you may not use this file except in
3 # compliance with the License. You may obtain a copy of the License at
4 # http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
5 # License Version 1.1, but Sections 14 and 15 have been added to cover use of
6 # software over a computer network and provide for limited attribution for the
7 # Original Developer. In addition, Exhibit A has been modified to be consistent
8 # with Exhibit B.
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
12 # the specific language governing rights and limitations under the License.
14 # The Original Code is reddit.
16 # The Original Developer is the Initial Developer. The Initial Developer of
17 # the Original Code is reddit Inc.
19 # All portions of the code written by reddit are Copyright (c) 2006-2015 reddit
20 # Inc. All Rights Reserved.
21 ###############################################################################
22 import os
24 from r2.lib.translation import I18N_PATH
25 from r2.lib.plugin import PluginLoader
26 from r2.lib import js
28 print 'POTFILE := ' + os.path.join(I18N_PATH, 'r2.pot')
30 plugins = PluginLoader()
31 print 'PLUGINS := ' + ' '.join(plugin.name for plugin in plugins
32 if plugin.needs_static_build)
34 print 'PLUGIN_I18N_PATHS := ' + ','.join(os.path.relpath(plugin.path)
35 for plugin in plugins
36 if plugin.needs_translation)
38 import sys
39 for plugin in plugins:
40 print 'PLUGIN_PATH_%s := %s' % (plugin.name, plugin.path)
42 js.load_plugin_modules(plugins)
43 modules = dict((k, m) for k, m in js.module.iteritems())
44 print 'JS_MODULES := ' + ' '.join(modules.iterkeys())
45 outputs = []
46 for name, module in modules.iteritems():
47 outputs.extend(module.outputs)
48 print 'JS_MODULE_OUTPUTS_%s := %s' % (name, ' '.join(module.outputs))
49 print 'JS_MODULE_DEPS_%s := %s' % (name, ' '.join(module.dependencies))
51 print 'JS_OUTPUTS := ' + ' '.join(outputs)
52 print 'DEFS_SUCCESS := 1'