build/Makefile.in
author Kyle Huey <khuey@kylehuey.com>
Sat, 15 Mar 2014 12:00:15 -0700
changeset 190962 32f48d6d3389ea5db45cfc6e452ec52595c11a43
parent 180392 148382c24e1cd062d8a037f441cf9e9cc6dcfa4b
child 191118 4f6e41f47e9fe14bbc2533cdcc5e41101bc7d48c
permissions -rw-r--r--
Bug 967364: Rename already_AddRefed::get to take. r=bsmedberg

#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

USE_RCS_MK := 1
include $(topsrcdir)/config/makefiles/makeutils.mk

ifdef MOZ_APP_BASENAME
DIST_FILES = $(srcdir)/application.ini

ifneq (android,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_UPDATER
DIST_FILES += update-settings.ini
endif
endif

ifdef LIBXUL_SDK
APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini
else
APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
endif

APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
APP_INI_DEPS += $(DEPTH)/config/buildid

DEFINES += -DAPP_BUILDID=$(APP_BUILDID)

APP_INI_DEPS += $(DEPTH)/config/autoconf.mk

MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node|short}\n' 2>/dev/null))
ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
endif

source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
ifneq (,$(source_repo))
  DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
endif

endif

# Put a useful .gdbinit in the bin directory, to be picked up automatically
# by GDB when we debug executables there.
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
GDBINIT_FILES := $(topsrcdir)/.gdbinit
GDBINIT_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += GDBINIT

# Put a .lldbinit in the bin directory and the objdir, to be picked up
# automatically by LLDB when we debug executables using either of those two
# directories as the current working directory.  The .lldbinit file will
# load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
LLDBINIT_OBJDIR := .lldbinit.in
LLDBINIT_OBJDIR_PATH = $(DEPTH)
LLDBINIT_OBJDIR_FLAGS += -Dtopsrcdir=$(abspath $(topsrcdir))
PP_TARGETS += LLDBINIT_OBJDIR

LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit
LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += LLDBINIT_FINAL_TARGET

include $(topsrcdir)/config/rules.mk

# we install to _leaktest/
TARGET_DEPTH = ..
include $(srcdir)/automation-build.mk

_LEAKTEST_DIR = $(DEPTH)/_leaktest

_LEAKTEST_FILES =    \
		automation.py \
		automationutils.py \
		$(topsrcdir)/testing/profiles/prefs_general.js \
		leaktest.py \
		bloatcycle.html \
		$(topsrcdir)/build/pgo/server-locations.txt \
		$(topsrcdir)/build/pgo/favicon.ico \
		$(topsrcdir)/build/pgo/blueprint/sample.html \
		$(topsrcdir)/build/pgo/blueprint/elements.html \
		$(topsrcdir)/build/pgo/blueprint/forms.html \
		$(topsrcdir)/build/pgo/blueprint/grid.html \
		$(topsrcdir)/build/pgo/blueprint/test.jpg \
		$(topsrcdir)/build/pgo/blueprint/test-small.jpg \
		$(topsrcdir)/build/pgo/blueprint/valid.png \
		$(topsrcdir)/build/pgo/blueprint/screen.css \
		$(topsrcdir)/build/pgo/blueprint/print.css \
		$(topsrcdir)/build/pgo/blueprint/grid.png \
		$(topsrcdir)/build/pgo/blueprint/fancytype-screen.css \
		$(NULL)

leaktest.py: leaktest.py.in
	$(call py_action,preprocessor,$^ -o $@)
	chmod +x $@
GARBAGE += leaktest.py

ifdef MOZ_APP_BASENAME
$(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)

ifdef MOZ_APP_STATIC_INI
application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
	$(PYTHON) $^ > $@
export:: application.ini.h
GARBAGE += application.ini.h
endif
endif

libs:: $(_LEAKTEST_FILES)
	$(INSTALL) $^ $(_LEAKTEST_DIR)

ifdef MOZ_VALGRIND
_VALGRIND_DIR = $(DEPTH)/_valgrind
GARBAGE_DIRS += $(_VALGRIND_DIR)

_VALGRIND_FILES = \
		$(topsrcdir)/build/valgrind/cross-architecture.sup \
		$(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \
		$(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \
		$(NULL)

libs:: $(_VALGRIND_FILES)
	$(INSTALL) $^ $(_VALGRIND_DIR)
endif

ifdef ENABLE_TESTS
libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
	$(INSTALL) $< $(DIST)/bin

ifeq ($(OS_ARCH),Darwin)
libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
	$(INSTALL) $< $(DIST)/bin
endif

ifeq ($(OS_ARCH),Linux)
libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl
	$(INSTALL) $< $(DIST)/bin
endif

GARBAGE += $(srcdir)/automationutils.pyc

endif # ENABLE_TESTS