Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | # |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | USE_RCS_MK := 1 |
michael@0 | 7 | include $(topsrcdir)/config/makefiles/makeutils.mk |
michael@0 | 8 | |
michael@0 | 9 | ifdef MOZ_APP_BASENAME |
michael@0 | 10 | DIST_FILES = $(srcdir)/application.ini |
michael@0 | 11 | |
michael@0 | 12 | ifneq (android,$(MOZ_WIDGET_TOOLKIT)) |
michael@0 | 13 | ifdef MOZ_UPDATER |
michael@0 | 14 | DIST_FILES += update-settings.ini |
michael@0 | 15 | endif |
michael@0 | 16 | endif |
michael@0 | 17 | |
michael@0 | 18 | ifdef LIBXUL_SDK |
michael@0 | 19 | APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini |
michael@0 | 20 | else |
michael@0 | 21 | APP_INI_DEPS = $(topsrcdir)/config/milestone.txt |
michael@0 | 22 | endif |
michael@0 | 23 | |
michael@0 | 24 | APP_BUILDID := $(shell cat $(DEPTH)/config/buildid) |
michael@0 | 25 | APP_INI_DEPS += $(DEPTH)/config/buildid |
michael@0 | 26 | |
michael@0 | 27 | DEFINES += -DAPP_BUILDID=$(APP_BUILDID) |
michael@0 | 28 | |
michael@0 | 29 | APP_INI_DEPS += $(DEPTH)/config/autoconf.mk |
michael@0 | 30 | |
michael@0 | 31 | MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node|short}\n' 2>/dev/null)) |
michael@0 | 32 | ifdef MOZ_SOURCE_STAMP |
michael@0 | 33 | DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)' |
michael@0 | 34 | endif |
michael@0 | 35 | |
michael@0 | 36 | source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..) |
michael@0 | 37 | ifneq (,$(source_repo)) |
michael@0 | 38 | DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)' |
michael@0 | 39 | endif |
michael@0 | 40 | |
michael@0 | 41 | endif |
michael@0 | 42 | |
michael@0 | 43 | # Put a useful .gdbinit in the bin directory, to be picked up automatically |
michael@0 | 44 | # by GDB when we debug executables there. |
michael@0 | 45 | # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir. |
michael@0 | 46 | GDBINIT_FILES := $(topsrcdir)/.gdbinit |
michael@0 | 47 | GDBINIT_OBJDIR_FILES = $(topsrcdir)/.gdbinit |
michael@0 | 48 | GDBINIT_DEST = $(FINAL_TARGET) |
michael@0 | 49 | |
michael@0 | 50 | # needs to be absolute to be distinct from $(topsrcdir)/.gdbinit |
michael@0 | 51 | GDBINIT_OBJDIR_DEST = $(abspath $(DEPTH)) |
michael@0 | 52 | INSTALL_TARGETS += GDBINIT GDBINIT_OBJDIR |
michael@0 | 53 | |
michael@0 | 54 | # Put a .lldbinit in the bin directory and the objdir, to be picked up |
michael@0 | 55 | # automatically by LLDB when we debug executables using either of those two |
michael@0 | 56 | # directories as the current working directory. The .lldbinit file will |
michael@0 | 57 | # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are. |
michael@0 | 58 | LLDBINIT_OBJDIR := .lldbinit.in |
michael@0 | 59 | LLDBINIT_OBJDIR_PATH = $(DEPTH) |
michael@0 | 60 | LLDBINIT_OBJDIR_FLAGS += -Dtopsrcdir=$(abspath $(topsrcdir)) |
michael@0 | 61 | PP_TARGETS += LLDBINIT_OBJDIR |
michael@0 | 62 | |
michael@0 | 63 | LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit |
michael@0 | 64 | LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET) |
michael@0 | 65 | INSTALL_TARGETS += LLDBINIT_FINAL_TARGET |
michael@0 | 66 | |
michael@0 | 67 | include $(topsrcdir)/config/rules.mk |
michael@0 | 68 | |
michael@0 | 69 | # we install to _leaktest/ |
michael@0 | 70 | TARGET_DEPTH = .. |
michael@0 | 71 | include $(srcdir)/automation-build.mk |
michael@0 | 72 | |
michael@0 | 73 | _LEAKTEST_DIR = $(DEPTH)/_leaktest |
michael@0 | 74 | |
michael@0 | 75 | _LEAKTEST_FILES = \ |
michael@0 | 76 | automation.py \ |
michael@0 | 77 | automationutils.py \ |
michael@0 | 78 | $(topsrcdir)/testing/profiles/prefs_general.js \ |
michael@0 | 79 | leaktest.py \ |
michael@0 | 80 | bloatcycle.html \ |
michael@0 | 81 | $(topsrcdir)/build/pgo/server-locations.txt \ |
michael@0 | 82 | $(topsrcdir)/build/pgo/favicon.ico \ |
michael@0 | 83 | $(topsrcdir)/build/pgo/blueprint/sample.html \ |
michael@0 | 84 | $(topsrcdir)/build/pgo/blueprint/elements.html \ |
michael@0 | 85 | $(topsrcdir)/build/pgo/blueprint/forms.html \ |
michael@0 | 86 | $(topsrcdir)/build/pgo/blueprint/grid.html \ |
michael@0 | 87 | $(topsrcdir)/build/pgo/blueprint/test.jpg \ |
michael@0 | 88 | $(topsrcdir)/build/pgo/blueprint/test-small.jpg \ |
michael@0 | 89 | $(topsrcdir)/build/pgo/blueprint/valid.png \ |
michael@0 | 90 | $(topsrcdir)/build/pgo/blueprint/screen.css \ |
michael@0 | 91 | $(topsrcdir)/build/pgo/blueprint/print.css \ |
michael@0 | 92 | $(topsrcdir)/build/pgo/blueprint/grid.png \ |
michael@0 | 93 | $(topsrcdir)/build/pgo/blueprint/fancytype-screen.css \ |
michael@0 | 94 | $(NULL) |
michael@0 | 95 | |
michael@0 | 96 | leaktest.py: leaktest.py.in |
michael@0 | 97 | $(call py_action,preprocessor,$^ -o $@) |
michael@0 | 98 | chmod +x $@ |
michael@0 | 99 | GARBAGE += leaktest.py |
michael@0 | 100 | |
michael@0 | 101 | ifdef MOZ_APP_BASENAME |
michael@0 | 102 | $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS) |
michael@0 | 103 | |
michael@0 | 104 | ifdef MOZ_APP_STATIC_INI |
michael@0 | 105 | application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini |
michael@0 | 106 | $(PYTHON) $^ > $@ |
michael@0 | 107 | export:: application.ini.h |
michael@0 | 108 | GARBAGE += application.ini.h |
michael@0 | 109 | endif |
michael@0 | 110 | endif |
michael@0 | 111 | |
michael@0 | 112 | libs:: $(_LEAKTEST_FILES) |
michael@0 | 113 | $(INSTALL) $^ $(_LEAKTEST_DIR) |
michael@0 | 114 | |
michael@0 | 115 | ifdef MOZ_VALGRIND |
michael@0 | 116 | _VALGRIND_DIR = $(DEPTH)/_valgrind |
michael@0 | 117 | GARBAGE_DIRS += $(_VALGRIND_DIR) |
michael@0 | 118 | |
michael@0 | 119 | _VALGRIND_FILES = \ |
michael@0 | 120 | $(topsrcdir)/build/valgrind/cross-architecture.sup \ |
michael@0 | 121 | $(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \ |
michael@0 | 122 | $(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \ |
michael@0 | 123 | $(NULL) |
michael@0 | 124 | |
michael@0 | 125 | libs:: $(_VALGRIND_FILES) |
michael@0 | 126 | $(INSTALL) $^ $(_VALGRIND_DIR) |
michael@0 | 127 | endif |
michael@0 | 128 | |
michael@0 | 129 | ifdef ENABLE_TESTS |
michael@0 | 130 | libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py |
michael@0 | 131 | $(INSTALL) $< $(DIST)/bin |
michael@0 | 132 | |
michael@0 | 133 | ifeq ($(OS_ARCH),Darwin) |
michael@0 | 134 | libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py |
michael@0 | 135 | $(INSTALL) $< $(DIST)/bin |
michael@0 | 136 | endif |
michael@0 | 137 | |
michael@0 | 138 | ifeq ($(OS_ARCH),Linux) |
michael@0 | 139 | libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl |
michael@0 | 140 | $(INSTALL) $< $(DIST)/bin |
michael@0 | 141 | endif |
michael@0 | 142 | |
michael@0 | 143 | GARBAGE += $(srcdir)/automationutils.pyc |
michael@0 | 144 | |
michael@0 | 145 | endif # ENABLE_TESTS |