config/Makefile.in

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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 # -*- Makefile -*-
michael@0 2 #
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 # STDCXX_COMPAT is not needed here, and will actually fail because
michael@0 8 # libstdc++-compat is not built yet.
michael@0 9 MOZ_LIBSTDCXX_HOST_VERSION =
michael@0 10
michael@0 11 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
michael@0 12 # a recursive rule for finding nsinstall and the Perl scripts.
michael@0 13 ifdef NSBUILDROOT
michael@0 14 override NSBUILDROOT :=
michael@0 15 endif
michael@0 16
michael@0 17 ifdef GNU_CC
michael@0 18 MODULE_OPTIMIZE_FLAGS = -O3
michael@0 19 endif
michael@0 20
michael@0 21 include $(topsrcdir)/config/config.mk
michael@0 22
michael@0 23 ifneq (WINNT,$(HOST_OS_ARCH))
michael@0 24 ifdef COMPILE_ENVIRONMENT
michael@0 25 # Ensure nsinstall is atomically created
michael@0 26 nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
michael@0 27 cp $^ $@.tmp
michael@0 28 mv $@.tmp $@
michael@0 29
michael@0 30 NSINSTALL_EXECUTABLES := nsinstall$(HOST_BIN_SUFFIX)
michael@0 31 NSINSTALL_DEST := $(DIST)/bin
michael@0 32 NSINSTALL_TARGET := export
michael@0 33 INSTALL_TARGETS += NSINSTALL
michael@0 34 endif
michael@0 35 endif
michael@0 36
michael@0 37 ifndef JS_STANDALONE
michael@0 38 HEADERS_FILES = \
michael@0 39 $(DEPTH)/mozilla-config.h \
michael@0 40 $(NULL)
michael@0 41 HEADERS_DEST := $(DIST)/include
michael@0 42 HEADERS_TARGET := export
michael@0 43 INSTALL_TARGETS += HEADERS
michael@0 44 endif
michael@0 45
michael@0 46 PYTHON_UNIT_TESTS := $(wildcard $(srcdir)/tests/unit-*.py)
michael@0 47
michael@0 48 include $(topsrcdir)/config/rules.mk
michael@0 49
michael@0 50 HOST_CFLAGS += -DUNICODE -D_UNICODE
michael@0 51
michael@0 52 ifndef JS_STANDALONE
michael@0 53 # Generate a new buildid every time we "export" in config... that's only
michael@0 54 # supposed to be once per-build!
michael@0 55 export::
michael@0 56 ifdef MOZ_BUILD_DATE
michael@0 57 printf '%s' $(MOZ_BUILD_DATE) > buildid
michael@0 58 else
michael@0 59 $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
michael@0 60 endif
michael@0 61 endif
michael@0 62
michael@0 63 ifdef WRAP_SYSTEM_INCLUDES
michael@0 64 export-preqs = \
michael@0 65 $(call mkdir_deps,system_wrappers) \
michael@0 66 $(NULL)
michael@0 67
michael@0 68 export:: $(export-preqs)
michael@0 69 $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
michael@0 70 -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
michael@0 71 -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
michael@0 72 -DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
michael@0 73 -DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
michael@0 74 -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
michael@0 75 -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
michael@0 76 -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
michael@0 77 -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
michael@0 78 -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
michael@0 79 -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
michael@0 80 $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
michael@0 81 $(INSTALL) system_wrappers $(DIST)
michael@0 82
michael@0 83 GARBAGE_DIRS += system_wrappers
michael@0 84 endif
michael@0 85
michael@0 86 ifdef WRAP_STL_INCLUDES
michael@0 87 ifdef GNU_CXX
michael@0 88 stl_compiler = gcc
michael@0 89 else
michael@0 90 ifdef _MSC_VER
michael@0 91 stl_compiler = msvc
michael@0 92 endif
michael@0 93 endif
michael@0 94 endif
michael@0 95
michael@0 96 ifdef stl_compiler
michael@0 97 STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
michael@0 98
michael@0 99 $(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
michael@0 100 $(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
michael@0 101 $(PYTHON) $(srcdir)/nsinstall.py -t stl_wrappers $(DIST)
michael@0 102 touch $(STL_WRAPPERS_SENTINEL)
michael@0 103
michael@0 104 export:: $(STL_WRAPPERS_SENTINEL)
michael@0 105
michael@0 106 GARBAGE += $(STL_WRAPPERS_SENTINEL)
michael@0 107 GARBAGE_DIRS += stl_wrappers
michael@0 108 endif
michael@0 109
michael@0 110 GARBAGE += \
michael@0 111 $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) buildid $(srcdir)/*.pyc *.pyc
michael@0 112
michael@0 113 FORCE:
michael@0 114
michael@0 115 ifndef JS_STANDALONE
michael@0 116 check-preqs += check-jar-mn
michael@0 117 endif
michael@0 118 check-preqs += check-makefiles
michael@0 119
michael@0 120 check:: $(check-preqs)
michael@0 121
michael@0 122 check-jar-mn::
michael@0 123 $(MAKE) -C tests/src-simple check-jar
michael@0 124 $(MAKE) -C tests/src-simple check-flat
michael@0 125 $(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
michael@0 126 ifneq (,$(filter-out WINNT,$(OS_ARCH)))
michael@0 127 $(MAKE) -C tests/src-simple check-symlink
michael@0 128 endif
michael@0 129
michael@0 130 check-makefiles:
michael@0 131 $(MAKE) -C tests/makefiles/autodeps check

mercurial