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
)
11 ifneq ($(make_min_ver
),$(firstword $(sort $(make_min_ver
) $(MAKE_VERSION
))))
12 $(error GNU Make
$(make_min_ver
) or higher is required
)
17 # Define keyword generator before rules.mk, see bug 323979 comment 50
21 include $(topsrcdir
)/config
/rules.mk
25 JITTEST_VALGRIND_FLAG
= --valgrind
29 ifneq ($(LLVM_SYMBOLIZER
),)
30 # Use the LLVM symbolizer when running jit-tests under ASan and TSan, if available
32 JITTEST_SANITIZER_ENV
=ASAN_SYMBOLIZER_PATH
='$(LLVM_SYMBOLIZER)'
35 JITTEST_SANITIZER_ENV
=TSAN_OPTIONS
="external_symbolizer_path=$(LLVM_SYMBOLIZER) handle_segv=0 $$TSAN_OPTIONS"
38 JITTEST_SANITIZER_ENV
=MSAN_SYMBOLIZER_PATH
='$(LLVM_SYMBOLIZER)'
43 (cd
$(topsrcdir
) && $(PYTHON3
) $(topsrcdir
)/config
/check_js_msg_encoding.py
);
46 $(JITTEST_SANITIZER_ENV
) $(wildcard $(RUN_TEST_PROGRAM
)) $(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
)
55 $(wildcard $(RUN_TEST_PROGRAM
)) $(PYTHON3
) -u
$(srcdir)/tests
/jstests.py \
56 --no-progress
--format
=automation
--timeout
300 \
57 $(JSTESTS_EXTRA_ARGS
) \
58 $(DIST
)/bin
/js
$(BIN_SUFFIX
)
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
)
73 #check:: check-jstests
77 CFLAGS
+= $(MOZ_ZLIB_CFLAGS
)
79 # Silence warnings on AIX/HP-UX from non-GNU compilers
82 # Suppress warnings from xlC
83 # 1540-1281: offsetof() on null non-POD types
84 # 1540-1608: anonymous unions using static data members
85 CFLAGS
+= -qsuppress
=1540-1281 -qsuppress
=1540-1608
86 CXXFLAGS
+= -qsuppress
=1540-1281 -qsuppress
=1540-1608
88 ifeq ($(OS_ARCH
),HP-UX
)
89 # Suppress warnings from aCC
90 # 3055: anonymous unions declaring types
91 # 4189: offsetof() on non-POD types
93 CXXFLAGS
+= +W3055
,4189
96 ifeq ($(OS_ARCH
),SunOS
)
97 ifeq ($(TARGET_CPU
),sparc
)
108 $(MAKE
) -C build
install
109 $(MAKE
) -C
shell install
112 javascript-trace.h
: $(srcdir)/devtools
/javascript-trace.d
113 dtrace
-x nolibs
-h
-s
$(srcdir)/devtools
/javascript-trace.d
-o javascript-trace.h.in
114 sed
-e
's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
115 -e
'/const/!s/char \*/const char */g' \
116 javascript-trace.h.in
> javascript-trace.h
118 # We can't automatically generate dependencies on auto-generated headers;
119 # we have to list them explicitly.
120 $(addsuffix .
$(OBJ_SUFFIX
),Probes jsinterp jsobj
): $(CURDIR
)/javascript-trace.h
122 ifneq ($(OS_ARCH
),Darwin
)
123 DTRACE_PROBE_OBJ
= js-dtrace.
$(OBJ_SUFFIX
)
124 $(LIBRARY
): $(DTRACE_PROBE_OBJ
)
125 $(DTRACE_PROBE_OBJ
): $(srcdir)/devtools
/javascript-trace.d
$(OBJS
)
126 dtrace
-x nolibs
-G
-C
-s
$< -o
$@
$(filter-out $<, $^
)
128 OBJS
+= $(DTRACE_PROBE_OBJ
)
129 endif # OS_ARCH != Darwin
132 ###############################################
133 # Generating source package tarballs
134 # (only possible when tar is found)
144 MOZJS_MAJOR_VERSION
=$(MOZJS_MAJOR_VERSION
) \
145 MOZJS_MINOR_VERSION
=$(MOZJS_MINOR_VERSION
) \
146 MOZJS_PATCH_VERSION
=$(MOZJS_PATCH_VERSION
) \
147 MOZJS_ALPHA
=$(MOZJS_ALPHA
) \
148 $(srcdir)/make-source-package.sh