~ubuntu-branches/ubuntu/trusty/enigmail/trusty

« back to all changes in this revision

Viewing changes to mozilla/Makefile.in

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-mpeaob8bhtk42aun
Tags: 2:1.5.2-0ubuntu1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# This Source Code Form is subject to the terms of the Mozilla Public
 
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
 
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
5
 
 
6
DEPTH           = @DEPTH@
 
7
topsrcdir       = @top_srcdir@
 
8
srcdir          = @srcdir@
 
9
VPATH           = @srcdir@
 
10
 
 
11
ifndef .PYMAKE
 
12
ifeq (,$(MAKE_VERSION))
 
13
$(error GNU Make is required)
 
14
endif
 
15
ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
 
16
$(error GNU Make 3.80 or higher is required)
 
17
endif
 
18
endif
 
19
 
 
20
include $(DEPTH)/config/autoconf.mk
 
21
 
 
22
default::
 
23
 
 
24
TIERS += base
 
25
 
 
26
#
 
27
# tier "base" - basic setup
 
28
#
 
29
tier_base_dirs = \
 
30
  config \
 
31
  build \
 
32
  probes \
 
33
  $(NULL)
 
34
 
 
35
ifndef LIBXUL_SDK
 
36
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
 
37
tier_base_dirs += \
 
38
  other-licenses/android \
 
39
  $(NULL)
 
40
endif
 
41
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 
42
tier_base_dirs += \
 
43
  other-licenses/android \
 
44
  $(NULL)
 
45
endif
 
46
 
 
47
ifdef MOZ_MEMORY
 
48
tier_base_dirs += memory/mozjemalloc
 
49
ifdef MOZ_JEMALLOC
 
50
tier_base_dirs += memory/jemalloc
 
51
endif
 
52
tier_base_dirs += memory/build
 
53
endif
 
54
ifndef MOZ_NATIVE_ZLIB
 
55
tier_base_dirs += modules/zlib
 
56
endif
 
57
tier_base_dirs += \
 
58
  mozglue \
 
59
  memory/mozalloc \
 
60
  $(NULL)
 
61
endif
 
62
 
 
63
ifdef COMPILE_ENVIRONMENT
 
64
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
 
65
endif
 
66
 
 
67
 
 
68
include $(topsrcdir)/config/config.mk
 
69
 
 
70
GARBAGE_DIRS += dist _javagen _profile _tests staticlib
 
71
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
 
72
   config/autoconf.mk \
 
73
   unallmakefiles mozilla-config.h \
 
74
   netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
 
75
   $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
 
76
 
 
77
default alldep all:: $(topsrcdir)/configure config.status
 
78
        $(RM) -r $(DIST)/sdk
 
79
        $(RM) -r $(DIST)/include
 
80
        $(RM) -r $(DIST)/private
 
81
        $(RM) -r $(DIST)/public
 
82
        $(RM) $(DIST)/chrome.manifest
 
83
        $(RM) -r _tests
 
84
 
 
85
$(topsrcdir)/configure: $(topsrcdir)/configure.in
 
86
        @echo "STOP!  configure.in has changed, and your configure is out of date."
 
87
        @echo "Please rerun autoconf and re-configure your build directory."
 
88
        @echo "To ignore this message, touch 'configure' in the source directory,"
 
89
        @echo "but your build might not succeed."
 
90
        @exit 1
 
91
 
 
92
config.status: $(topsrcdir)/configure
 
93
        @echo "STOP!  configure has changed and needs to be run in this build directory."
 
94
        @echo "Please rerun configure."
 
95
        @echo "To ignore this message, touch 'config.status' in the build directory,"
 
96
        @echo "but your build might not succeed."
 
97
        @exit 1
 
98
 
 
99
# Build pseudo-external modules first when export is explicitly called
 
100
export::
 
101
        $(RM) -r $(DIST)/sdk
 
102
        $(MAKE) -C config export
 
103
        $(MAKE) tier_nspr
 
104
 
 
105
ifdef ENABLE_TESTS
 
106
# Additional makefile targets to call automated test suites
 
107
include $(topsrcdir)/testing/testsuite-targets.mk
 
108
endif
 
109
 
 
110
include $(topsrcdir)/config/rules.mk
 
111
 
 
112
distclean::
 
113
        cat unallmakefiles | $(XARGS) rm -f
 
114
        $(RM) unallmakefiles $(DIST_GARBAGE)
 
115
 
 
116
ifeq ($(OS_ARCH),WINNT)
 
117
# we want to copy PDB files on Windows
 
118
MAKE_SYM_STORE_ARGS := -c --vcs-info
 
119
ifdef PDBSTR_PATH
 
120
MAKE_SYM_STORE_ARGS += -i
 
121
endif
 
122
DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms_vc$(_MSC_VER).exe
 
123
# PDB files don't get moved to dist, so we need to scan the whole objdir
 
124
MAKE_SYM_STORE_PATH := .
 
125
endif
 
126
ifeq ($(OS_ARCH),Darwin)
 
127
# need to pass arch flags for universal builds
 
128
ifdef UNIVERSAL_BINARY
 
129
MAKE_SYM_STORE_ARGS := -c -a "i386 x86_64" --vcs-info
 
130
MAKE_SYM_STORE_PATH := $(DIST)/universal
 
131
else
 
132
MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
 
133
MAKE_SYM_STORE_PATH := $(DIST)/bin
 
134
endif
 
135
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
 
136
endif
 
137
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
 
138
MAKE_SYM_STORE_ARGS := -c --vcs-info
 
139
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
 
140
MAKE_SYM_STORE_PATH := $(DIST)/bin
 
141
endif
 
142
 
 
143
SYM_STORE_SOURCE_DIRS := $(topsrcdir)
 
144
 
 
145
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 
146
 
 
147
ifdef MOZ_SYMBOLS_EXTRA_BUILDID
 
148
EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
 
149
endif
 
150
 
 
151
SYMBOL_INDEX_NAME = \
 
152
  $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)-$(CPU_ARCH)$(EXTRA_BUILDID)-symbols.txt
 
153
 
 
154
buildsymbols:
 
155
ifdef MOZ_CRASHREPORTER
 
156
ifdef USE_ELF_HACK
 
157
    ifeq (mobile,$(MOZ_BUILD_APP))
 
158
                $(MAKE) -C mobile/xul/installer elfhack
 
159
    else
 
160
                $(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack
 
161
    endif
 
162
endif
 
163
        echo building symbol store
 
164
        $(RM) -r $(DIST)/crashreporter-symbols
 
165
        $(RM) "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
 
166
        $(NSINSTALL) -D $(DIST)/crashreporter-symbols
 
167
        OBJCOPY="$(OBJCOPY)" \
 
168
        $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
 
169
          $(MAKE_SYM_STORE_ARGS)                                          \
 
170
          --exclude="*test*" --exclude="*Test*"                           \
 
171
          $(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir))               \
 
172
          $(DUMP_SYMS_BIN)                                                \
 
173
          $(DIST)/crashreporter-symbols                                   \
 
174
          $(MAKE_SYM_STORE_PATH) >                                        \
 
175
          $(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
 
176
        echo packing symbols
 
177
        $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
 
178
        cd $(DIST)/crashreporter-symbols && \
 
179
          zip -r9D "../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip" .
 
180
        cd $(DIST)/crashreporter-symbols && \
 
181
        grep "sym" $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \
 
182
          mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME)
 
183
        cd $(DIST)/crashreporter-symbols && \
 
184
          zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" . -i "*.sym" -i "*.txt"
 
185
endif # MOZ_CRASHREPORTER
 
186
 
 
187
uploadsymbols:
 
188
ifdef MOZ_CRASHREPORTER
 
189
        $(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
 
190
endif
 
191
 
 
192
codesighs:
 
193
        $(MAKE) -C $(MOZ_BUILD_APP)/installer codesighs
 
194
 
 
195
# defined in package-name.mk
 
196
export MOZ_SOURCE_STAMP
 
197
 
 
198
#XXX: this is a hack, since we don't want to clobber for MSVC
 
199
# PGO support, but we can't do this test in client.mk
 
200
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
 
201
# No point in clobbering if PGO has been explicitly disabled.
 
202
ifndef NO_PROFILE_GUIDED_OPTIMIZE
 
203
maybe_clobber_profiledbuild: clean
 
204
else
 
205
maybe_clobber_profiledbuild:
 
206
endif
 
207
else
 
208
maybe_clobber_profiledbuild:
 
209
        $(RM) $(DIST)/bin/*.pgc
 
210
        find $(DIST)/$(MOZ_APP_NAME) -name "*.pgc" -exec mv {} $(DIST)/bin \;
 
211
endif
 
212
 
 
213
# put in our default gdbinit so that the gdb debugging experience is happier.
 
214
libs:: .gdbinit
 
215
        $(INSTALL) $< $(DIST)/bin
 
216
 
 
217
.PHONY: maybe_clobber_profiledbuild
 
218
 
 
219
# Look for R_386_PC32 relocations in shared libs, these
 
220
# break x86_64 builds and SELinux users.
 
221
ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)
 
222
scheck::
 
223
        @relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library.  Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi
 
224
endif
 
225
 
 
226
js/src/Makefile: subsrcdir := js/src