diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-10-04 13:11:27 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-10-25 05:39:36 +0400 |
commit | 15594eaf87066abc8cf36520a1ad95e0c52da517 (patch) | |
tree | 08295f62f03b2816860903f83dcb10de8d48daf7 /tools | |
parent | bb85e7751f1bd224fbce370ad84d8ce774e2d69a (diff) |
Replace WAF with make/autoconf
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/js2c.py | 27 | ||||
-rwxr-xr-x | tools/test.py | 4 |
2 files changed, 12 insertions, 19 deletions
diff --git a/tools/js2c.py b/tools/js2c.py index db4885553bb..ec3efb77121 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -252,7 +252,7 @@ GET_DELAY_SCRIPT_NAME_CASE = """\ if (index == %(i)i) return Vector<const char>("%(name)s", %(length)i); """ -def JS2C(source, target): +def JS2C(source): ids = [] delay_ids = [] modules = [] @@ -328,8 +328,7 @@ def JS2C(source, target): i = i + 1 # Emit result - output = open(str(target[0]), "w") - output.write(HEADER_TEMPLATE % { + return HEADER_TEMPLATE % { 'builtin_count': len(ids) + len(delay_ids), 'delay_count': len(delay_ids), 'source_lines': "\n".join(source_lines), @@ -337,17 +336,11 @@ def JS2C(source, target): 'get_index_cases': "".join(get_index_cases), 'get_script_source_cases': "".join(get_script_source_cases), 'get_script_name_cases': "".join(get_script_name_cases) - }) - output.close() - - if len(target) > 1: - output = open(str(target[1]), "w") - output.write(HEADER_TEMPLATE % { - 'builtin_count': len(ids) + len(delay_ids), - 'delay_count': len(delay_ids), - 'source_lines': "\n".join(source_lines_empty), - 'get_index_cases': "".join(get_index_cases), - 'get_script_source_cases': "".join(get_script_source_cases), - 'get_script_name_cases': "".join(get_script_name_cases) - }) - output.close() + } + + +if __name__ == "__main__": + files = sys.argv[1:] + print JS2C(files) + + diff --git a/tools/test.py b/tools/test.py index ba201334fce..4b3fdb63a65 100755 --- a/tools/test.py +++ b/tools/test.py @@ -663,9 +663,9 @@ class Context(object): def GetVm(self, mode): if mode == 'debug': - name = 'build/debug/node_g' + name = 'build/node_g' else: - name = 'build/default/node' + name = 'build/node' if utils.IsWindows() and not name.endswith('.exe'): name = name + '.exe' |