Bug 932076 - Add check for MediaExtractor creation failure. r=doublec
[gecko.git] / build / Makefile.in
blobd47fef044870fb1c352a8bb37b331b7cb1160f1f
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/.
6 USE_RCS_MK := 1
7 include $(topsrcdir)/config/makefiles/makeutils.mk
9 ifdef MOZ_APP_BASENAME
10 DIST_FILES = $(srcdir)/application.ini
12 ifneq (android,$(MOZ_WIDGET_TOOLKIT))
13 ifdef MOZ_UPDATER
14 DIST_FILES += update-settings.ini
15 endif
16 endif
18 ifdef LIBXUL_SDK
19 APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini
20 else
21 APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
22 endif
24 APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
25 APP_INI_DEPS += $(DEPTH)/config/buildid
27 DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DAPP_BUILDID=$(APP_BUILDID)
29 DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"
30 APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
32 MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
33 ifdef MOZ_SOURCE_STAMP
34 DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
35 endif
37 source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
38 ifneq (,$(source_repo))
39 DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
40 endif
42 DEFINES += \
43 -DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
44 -DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
45 -DMOZ_APP_ID="$(MOZ_APP_ID)" \
46 -DMAR_CHANNEL_ID="$(MAR_CHANNEL_ID)" \
47 -DACCEPTED_MAR_CHANNEL_IDS="$(ACCEPTED_MAR_CHANNEL_IDS)" \
48 $(NULL)
50 ifdef MOZ_APP_PROFILE
51 DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
52 endif
54 ifdef MOZ_CRASHREPORTER
55 DEFINES += -DMOZ_CRASHREPORTER
56 endif
58 ifdef MOZ_PROFILE_MIGRATOR
59 DEFINES += -DMOZ_PROFILE_MIGRATOR
60 endif
62 ifdef MOZ_EXTENSION_MANAGER
63 DEFINES += -DMOZ_EXTENSION_MANAGER
64 endif
66 endif
68 # Put a useful .gdbinit in the bin directory, to be picked up automatically
69 # by GDB when we debug executables there.
70 # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
71 GDBINIT_FILES := $(topsrcdir)/.gdbinit
72 GDBINIT_DEST = $(FINAL_TARGET)
73 INSTALL_TARGETS += GDBINIT
75 include $(topsrcdir)/config/rules.mk
77 # we install to _leaktest/
78 TARGET_DEPTH = ..
79 include $(srcdir)/automation-build.mk
81 _LEAKTEST_DIR = $(DEPTH)/_leaktest
83 _LEAKTEST_FILES = \
84 automation.py \
85 automationutils.py \
86 $(topsrcdir)/testing/profiles/prefs_general.js \
87 leaktest.py \
88 bloatcycle.html \
89 $(topsrcdir)/build/pgo/server-locations.txt \
90 $(topsrcdir)/build/pgo/favicon.ico \
91 $(topsrcdir)/build/pgo/blueprint/sample.html \
92 $(topsrcdir)/build/pgo/blueprint/elements.html \
93 $(topsrcdir)/build/pgo/blueprint/forms.html \
94 $(topsrcdir)/build/pgo/blueprint/grid.html \
95 $(topsrcdir)/build/pgo/blueprint/test.jpg \
96 $(topsrcdir)/build/pgo/blueprint/test-small.jpg \
97 $(topsrcdir)/build/pgo/blueprint/valid.png \
98 $(topsrcdir)/build/pgo/blueprint/screen.css \
99 $(topsrcdir)/build/pgo/blueprint/print.css \
100 $(topsrcdir)/build/pgo/blueprint/grid.png \
101 $(topsrcdir)/build/pgo/blueprint/fancytype-screen.css \
102 $(NULL)
104 leaktest.py: leaktest.py.in
105 $(PYTHON) $(topsrcdir)/config/Preprocessor.py $^ > $@
106 chmod +x $@
107 GARBAGE += leaktest.py
109 ifdef MOZ_APP_BASENAME
110 $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
112 ifdef MOZ_APP_STATIC_INI
113 DEFINES += -DMOZ_APP_STATIC_INI
115 application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
116 $(PYTHON) $^ > $@
117 export:: application.ini.h
118 GARBAGE += application.ini.h
119 endif
120 endif
122 libs:: $(_LEAKTEST_FILES)
123 $(INSTALL) $^ $(_LEAKTEST_DIR)
125 ifdef MOZ_VALGRIND
126 _VALGRIND_DIR = $(DEPTH)/_valgrind
127 GARBAGE_DIRS += $(_VALGRIND_DIR)
129 _VALGRIND_FILES = \
130 $(topsrcdir)/build/valgrind/cross-architecture.sup \
131 $(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \
132 $(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \
133 $(NULL)
135 libs:: $(_VALGRIND_FILES)
136 $(INSTALL) $^ $(_VALGRIND_DIR)
137 endif
139 ifdef ENABLE_TESTS
140 libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
141 $(INSTALL) $< $(DIST)/bin
143 ifeq ($(OS_ARCH),Darwin)
144 libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
145 $(INSTALL) $< $(DIST)/bin
146 endif
148 ifeq ($(OS_ARCH),Linux)
149 libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl
150 $(INSTALL) $< $(DIST)/bin
151 endif
153 GARBAGE += $(srcdir)/automationutils.pyc
155 endif # ENABLE_TESTS