Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 # -*- makefile -*-
2 # vim:set ts=8 sw=8 sts=8 noet:
3 #
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 ifdef EXPORT_LIBRARY
9 ifeq ($(EXPORT_LIBRARY),1)
10 ifdef IS_COMPONENT
11 EXPORT_LIBRARY = $(DEPTH)/staticlib/components
12 else
13 EXPORT_LIBRARY = $(DEPTH)/staticlib
14 endif
15 else
16 # If EXPORT_LIBRARY has a value, we'll be installing there. We also need to cleanup there
17 GARBAGE += $(foreach lib,$(LIBRARY),$(EXPORT_LIBRARY)/$(lib))
18 endif
19 endif # EXPORT_LIBRARY
21 binaries libs:: $(SUBMAKEFILES) $(TARGETS)
22 ifndef NO_DIST_INSTALL
23 ifdef SHARED_LIBRARY
24 ifdef IS_COMPONENT
25 $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
26 ifndef NO_COMPONENTS_MANIFEST
27 $(call py_action,buildlist,$(FINAL_TARGET)/chrome.manifest 'manifest components/components.manifest')
28 $(call py_action,buildlist,$(FINAL_TARGET)/components/components.manifest 'binary-component $(SHARED_LIBRARY)')
29 endif
30 endif # IS_COMPONENT
31 endif # SHARED_LIBRARY
32 endif # !NO_DIST_INSTALL
34 ifndef NO_DIST_INSTALL
36 ifneq (,$(strip $(PROGRAM)$(SIMPLE_PROGRAMS)))
37 PROGRAMS_EXECUTABLES = $(SIMPLE_PROGRAMS) $(PROGRAM)
38 PROGRAMS_DEST ?= $(FINAL_TARGET)
39 PROGRAMS_TARGET := binaries libs
40 INSTALL_TARGETS += PROGRAMS
41 endif
43 ifdef LIBRARY
44 ifdef EXPORT_LIBRARY
45 LIBRARY_FILES = $(LIBRARY)
46 LIBRARY_DEST ?= $(EXPORT_LIBRARY)
47 LIBRARY_TARGET = binaries libs
48 INSTALL_TARGETS += LIBRARY
49 endif
50 ifdef DIST_INSTALL
51 ifdef IS_COMPONENT
52 $(error Shipping static component libs makes no sense.)
53 else
54 DIST_LIBRARY_FILES = $(LIBRARY)
55 DIST_LIBRARY_DEST ?= $(DIST)/lib
56 DIST_LIBRARY_TARGET = binaries libs
57 INSTALL_TARGETS += DIST_LIBRARY
58 endif
59 endif # DIST_INSTALL
60 endif # LIBRARY
63 ifdef SHARED_LIBRARY
64 ifndef IS_COMPONENT
65 SHARED_LIBRARY_FILES = $(SHARED_LIBRARY)
66 SHARED_LIBRARY_DEST ?= $(FINAL_TARGET)
67 SHARED_LIBRARY_TARGET = binaries libs
68 INSTALL_TARGETS += SHARED_LIBRARY
70 ifneq (,$(filter WINNT,$(OS_ARCH)))
71 ifndef NO_INSTALL_IMPORT_LIBRARY
72 IMPORT_LIB_FILES = $(IMPORT_LIBRARY)
73 endif # NO_INSTALL_IMPORT_LIBRARY
74 else
75 IMPORT_LIB_FILES = $(SHARED_LIBRARY)
76 endif
78 IMPORT_LIB_DEST ?= $(DIST)/lib
79 IMPORT_LIB_TARGET = binaries libs
80 ifdef IMPORT_LIB_FILES
81 INSTALL_TARGETS += IMPORT_LIB
82 endif
84 endif # ! IS_COMPONENT
85 endif # SHARED_LIBRARY
87 ifneq (,$(strip $(HOST_SIMPLE_PROGRAMS)$(HOST_PROGRAM)))
88 HOST_PROGRAMS_EXECUTABLES = $(HOST_SIMPLE_PROGRAMS) $(HOST_PROGRAM)
89 HOST_PROGRAMS_DEST ?= $(DIST)/host/bin
90 HOST_PROGRAMS_TARGET = binaries libs
91 INSTALL_TARGETS += HOST_PROGRAMS
92 endif
94 ifdef HOST_LIBRARY
95 HOST_LIBRARY_FILES = $(HOST_LIBRARY)
96 HOST_LIBRARY_DEST ?= $(DIST)/host/lib
97 HOST_LIBRARY_TARGET = binaries libs
98 INSTALL_TARGETS += HOST_LIBRARY
99 endif
101 endif # !NO_DIST_INSTALL
103 ifdef MOZ_PSEUDO_DERECURSE
104 BINARIES_INSTALL_TARGETS := $(foreach category,$(INSTALL_TARGETS),$(if $(filter binaries,$($(category)_TARGET)),$(category)))
106 # Fill a dependency file with all the binaries installed somewhere in $(DIST)
107 # and with dependencies on the relevant backend files.
108 BINARIES_PP := $(MDDEPDIR)/binaries.pp
110 $(BINARIES_PP): Makefile $(wildcard backend.mk) $(call mkdir_deps,$(MDDEPDIR))
111 @echo '$(strip $(foreach category,$(BINARIES_INSTALL_TARGETS),\
112 $(foreach file,$($(category)_FILES) $($(category)_EXECUTABLES),\
113 $($(category)_DEST)/$(notdir $(file)): $(file)%\
114 )\
115 ))binaries: Makefile $(wildcard backend.mk)' | tr % '\n' > $@
117 else
118 binaries::
119 $(error The binaries target is not supported without MOZ_PSEUDO_DERECURSE)
120 endif
122 # EOF