Source code

Revision control

Other Tools

1
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2
# vim: set filetype=python:
3
# This Source Code Form is subject to the terms of the Mozilla Public
4
# License, v. 2.0. If a copy of the MPL was not distributed with this
5
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
if CONFIG['JS_SHELL_NAME']:
8
GeckoProgram(CONFIG['JS_SHELL_NAME'], linkage=None)
9
if CONFIG['JS_BUNDLED_EDITLINE']:
10
DIRS += ['../editline']
11
USE_LIBS += ['editline']
12
USE_LIBS += ['static:js']
13
14
include('../js-config.mozbuild')
15
include('../js-cxxflags.mozbuild')
16
include('../js-standalone.mozbuild')
17
18
UNIFIED_SOURCES += [
19
'js.cpp',
20
'jsoptparse.cpp',
21
'jsshell.cpp',
22
'OSObject.cpp'
23
]
24
25
if CONFIG['FUZZING_INTERFACES']:
26
UNIFIED_SOURCES += ['jsrtfuzzing/jsrtfuzzing.cpp']
27
USE_LIBS += [
28
'static:fuzzer',
29
]
30
31
DEFINES['EXPORT_JS_API'] = True
32
33
LOCAL_INCLUDES += [
34
'!..',
35
'..',
36
]
37
38
OS_LIBS += CONFIG['EDITLINE_LIBS']
39
40
# Prepare module loader JS code for embedding
41
GeneratedFile('shellmoduleloader.out.h', 'shellmoduleloader.js',
42
script='../builtin/embedjs.py',
43
entry_point='generate_shellmoduleloader',
44
inputs=[
45
'../js.msg',
46
'ModuleLoader.js',
47
])
48
49
# Place a GDB Python auto-load file next to the shell executable, both in
50
# the build directory and in the dist/bin directory.
51
DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
52
FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
53
OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']
54
55
# People expect the js shell to wind up in the top-level JS dir.
56
OBJDIR_FILES.js.src += ['!/dist/bin/js%s' % CONFIG['BIN_SUFFIX']]