Bug 1904839 - [devtools] Support color picker in High Contrast Mode. r=accessibility...
[gecko.git] / js / src / Makefile.in
blob9202f5efb256a2fe899840c0cee48312fcba2c29
1 # -*- Mode: makefile -*-
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/.
7 ifeq (,$(MAKE_VERSION))
8 $(error GNU Make is required)
9 endif
10 make_min_ver := 3.81
11 ifneq ($(make_min_ver),$(firstword $(sort $(make_min_ver) $(MAKE_VERSION))))
12 $(error GNU Make $(make_min_ver) or higher is required)
13 endif
15 DASH_R = -r
17 # Define keyword generator before rules.mk, see bug 323979 comment 50
19 USE_HOST_CXX = 1
21 include $(topsrcdir)/config/rules.mk
23 ifdef MOZ_VALGRIND
24 ifndef MOZ_ASAN
25 JITTEST_VALGRIND_FLAG = --valgrind
26 endif
27 endif
29 ifneq ($(LLVM_SYMBOLIZER),)
30 # Use the LLVM symbolizer when running jit-tests under ASan and TSan, if available
31 ifdef MOZ_ASAN
32 JITTEST_SANITIZER_ENV=ASAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
33 endif
34 ifdef MOZ_TSAN
35 JITTEST_SANITIZER_ENV=TSAN_OPTIONS="external_symbolizer_path=$(LLVM_SYMBOLIZER) handle_segv=0 $$TSAN_OPTIONS"
36 endif
37 ifdef MOZ_MSAN
38 JITTEST_SANITIZER_ENV=MSAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
39 endif
40 endif
42 check-js-msg::
43 (cd $(topsrcdir) && $(PYTHON3) $(topsrcdir)/config/check_js_msg_encoding.py);
45 check-jit-test::
46 $(JITTEST_SANITIZER_ENV) $(PYTHON3) -u $(srcdir)/jit-test/jit_test.py \
47 --no-slow --no-progress --format=automation --jitflags=all \
48 $(JITTEST_VALGRIND_FLAG) \
49 $(JITTEST_EXTRA_ARGS) \
50 $(DIST)/bin/js$(BIN_SUFFIX) $(JITTEST_TEST_ARGS)
52 check:: check-js-msg
54 check-jstests:
55 $(PYTHON3) -u $(srcdir)/tests/jstests.py \
56 --no-progress --format=automation --timeout 300 \
57 $(JSTESTS_EXTRA_ARGS) \
58 $(DIST)/bin/js$(BIN_SUFFIX)
60 # FIXME:
61 # We want to run check-jstests as part of |make check| on all platforms, on
62 # tinderbox. However, some configurations don't work quite right just yet.
63 # Rather than risking regressions in major configurations while fixing these
64 # secondary configuration, we work around them and fix the bugs later.
66 # Bug 652154: On Windows, SM(!m !t) don't work because of path problems with
67 # their unusual directory layout
69 # Bug 652155: On Mac, SM(d) doesn't work for unknown reasons
71 ifneq ($(OS_ARCH),WINNT)
72 ifndef HAVE_DTRACE
73 #check:: check-jstests
74 endif
75 endif
77 CFLAGS += $(MOZ_ZLIB_CFLAGS)
79 ifeq ($(OS_ARCH),SunOS)
80 ifeq ($(TARGET_CPU),sparc)
82 ifneq ($(CC_TYPE),clang-cl)
83 CFLAGS += -mcpu=v9
84 CXXFLAGS += -mcpu=v9
85 endif # !clang-cl
87 endif
88 endif
90 install::
91 $(MAKE) -C build install
92 $(MAKE) -C shell install
94 ifdef HAVE_DTRACE
95 javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
96 dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
97 sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
98 -e '/const/!s/char \*/const char */g' \
99 javascript-trace.h.in > javascript-trace.h
101 # We can't automatically generate dependencies on auto-generated headers;
102 # we have to list them explicitly.
103 $(addsuffix .$(OBJ_SUFFIX),Probes jsinterp jsobj): $(CURDIR)/javascript-trace.h
105 ifneq ($(OS_ARCH),Darwin)
106 DTRACE_PROBE_OBJ = js-dtrace.$(OBJ_SUFFIX)
107 $(LIBRARY): $(DTRACE_PROBE_OBJ)
108 $(DTRACE_PROBE_OBJ): $(srcdir)/devtools/javascript-trace.d $(OBJS)
109 dtrace -x nolibs -G -C -s $< -o $@ $(filter-out $<, $^)
111 OBJS += $(DTRACE_PROBE_OBJ)
112 endif # OS_ARCH != Darwin
113 endif # HAVE_DTRACE
115 ###############################################
116 # Generating source package tarballs
117 # (only possible when tar is found)
118 ifneq (,$(TAR))
120 source-package:
121 SRCDIR=$(srcdir) \
122 DIST=$(DIST) \
123 MKDIR=$(MKDIR) \
124 TAR=$(TAR) \
125 M4=$(M4) \
126 AWK=$(AWK) \
127 MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \
128 MOZJS_MINOR_VERSION=$(MOZJS_MINOR_VERSION) \
129 MOZJS_PATCH_VERSION=$(MOZJS_PATCH_VERSION) \
130 MOZJS_ALPHA=$(MOZJS_ALPHA) \
131 $(srcdir)/make-source-package.sh
133 endif