DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (31ec81b5d7bb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
# -*- Mode: makefile -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

ifdef _MSC_VER
# unnecessary PGO for js shell.  But gcc cannot turn off pgo because it is
# necessary to link PGO lib on gcc when a object/static lib are compiled
# for PGO.
NO_PROFILE_GUIDED_OPTIMIZE := 1
endif

DEFINES         += -DEXPORT_JS_API
# Building against js_static requires that we declare mfbt sybols "exported"
# on its behalf.
DEFINES         += -DIMPL_MFBT

LIBS      = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(MOZ_ZLIB_LIBS)
ifdef MOZ_NATIVE_FFI
EXTRA_LIBS += $(MOZ_FFI_LIBS)
endif
ifdef MOZ_NATIVE_ICU
EXTRA_LIBS += $(MOZ_ICU_LIBS)
endif

LOCAL_INCLUDES += -I$(topsrcdir) -I..

ifeq ($(OS_ARCH),Darwin)
ifeq ($(TARGET_CPU),x86_64)
DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000
endif
endif

ifdef QEMU_EXE
MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
endif

# Place a GDB Python auto-load file next to the shell executable, both in
# the build directory and in the dist/bin directory.
PP_TARGETS += SHELL_AUTOLOAD
SHELL_AUTOLOAD := js-gdb.py.in
SHELL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))

INSTALL_TARGETS += SHELL_INSTALL_AUTOLOAD
SHELL_INSTALL_AUTOLOAD_FILES := $(CURDIR)/js-gdb.py
SHELL_INSTALL_AUTOLOAD_DEST := $(DIST)/bin

INSTALL_TARGETS += SHELL_INSTALL_AUTOLOAD_SCRIPT
SHELL_INSTALL_AUTOLOAD_SCRIPT_FILES := js-gdb.gdb
SHELL_INSTALL_AUTOLOAD_SCRIPT_DEST := $(CURDIR)

include $(topsrcdir)/config/rules.mk

# People expect the js shell to wind up in the top-level JS dir.
libs::
	$(INSTALL) $(IFLAGS2) $(PROGRAM) $(DEPTH)

GARBAGE += $(DEPTH)/$(PROGRAM)

install:: $(PROGRAM)
	$(SYSINSTALL) $^ $(DESTDIR)$(bindir)