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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# -*- 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/.
include $(topsrcdir)/config/rules.mk
ifdef NM
# check_vanilla_allocations.py is tailored to Linux, so only run it there.
# That should be enough to catch any problems.
check-vanilla-allocations:
$(PYTHON3) $(topsrcdir)/config/check_vanilla_allocations.py $(REAL_LIBRARY)
# The "aggressive" variant will likely fail on some compiler/platform
# combinations, but is worth running by hand every once in a while.
check-vanilla-allocations-aggressive:
$(PYTHON3) $(topsrcdir)/config/check_vanilla_allocations.py --aggressive $(REAL_LIBRARY)
check:: check-vanilla-allocations
endif
$(LIBRARY_NAME).pc: js.pc
cp $^ $@
# Install versioned file, for parallel installability in Linux distributions
install:: $(LIBRARY_NAME).pc
cp $^ $(JS_LIBRARY_NAME).pc
$(SYSINSTALL) $(JS_LIBRARY_NAME).pc $(DESTDIR)$(libdir)/pkgconfig
install:: ../js-config.h
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(JS_LIBRARY_NAME)
install:: ../../../mozglue/baseprofiler/public/ProfilingCategoryList.h
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(JS_LIBRARY_NAME)/js
######################################################
# BEGIN SpiderMonkey header installation
#
# Mozilla/Gecko/Firefox mostly doesn't concern itself with defining a sensible
# install target, because it's shipping primarily packaged builds. And even if
# it did, those builds wouldn't really have reason to include header files. So
# we have to install public headers ourselves, rather than using something from
# config/rules.mk or similar.
#
# The overall directory structure of the installed headers looks like so:
#
# $(includedir)/
# $(JS_LIBRARY_NAME)/
# jsapi.h, jspubtd.h, etc. (all of EXPORTS)
# js/
# js/public/* headers (all are public)
# ds/
# js/src/ds/* public headers
# gc/
# js/src/gc/* public headers
# mozilla/
# mfbt headers
#
install::
$(call py_action,process_install_manifest,$(if $(filter copy,$(NSDISTMODE)),--no-symlinks )--track install_dist_include.track --no-symlinks $(DESTDIR)$(includedir)/$(JS_LIBRARY_NAME) $(DEPTH)/_build_manifests/install/dist_include)
#
# END SpiderMonkey header installation
#############################################
# Install versioned script, for parallel installability in Linux distributions
install:: js-config
cp $^ js$(MOZJS_MAJOR_VERSION)-config
$(SYSINSTALL) js$(MOZJS_MAJOR_VERSION)-config $(DESTDIR)$(bindir)
# Use install_name_tool to set the install_name properly for standalone
# installed libraries on macOS
install:: $(REAL_LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
ifneq (,$(REAL_LIBRARY))
$(SYSINSTALL) $(REAL_LIBRARY) $(DESTDIR)$(libdir)
mv -f $(DESTDIR)$(libdir)/$(REAL_LIBRARY) $(subst $(STATIC_LIBRARY_NAME),$(LIBRARY_NAME),$(DESTDIR)$(libdir)/$(REAL_LIBRARY))
endif
ifneq (,$(SHARED_LIBRARY))
$(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
ifeq ($(OS_ARCH),Darwin)
$(INSTALL_NAME_TOOL) -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
endif
endif
ifneq (,$(IMPORT_LIBRARY))
ifneq ($(IMPORT_LIBRARY),$(SHARED_LIBRARY))
$(SYSINSTALL) $(IMPORT_LIBRARY) $(DESTDIR)$(libdir)
endif
endif
|