2014-03-31 15:21:38 +04:00
# 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/.
EXTRA_DEPS += $( topsrcdir) /toolkit/library/libxul.mk
# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
# too old to support Python pretty-printers; if this changes, we could make
# this 'ifdef GNU_CC'.
i f e q ( L i n u x , $( OS_ARCH ) )
# Create a GDB Python auto-load file alongside the libxul shared library in
# the build directory.
PP_TARGETS += LIBXUL_AUTOLOAD
LIBXUL_AUTOLOAD = $( topsrcdir) /toolkit/library/libxul.so-gdb.py.in
LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir= $( abspath $( topsrcdir) )
e n d i f
2014-08-27 18:16:49 +04:00
i f d e f _ M S C _ V E R
2013-11-19 08:45:31 +04:00
get_first_and_last = dumpbin -exports $1 | grep _NSModule@@ | sort -k 3 | sed -n 's/^.*?\([^@]*\)@@.*$$/\1/;1p;$$p'
e l s e
2014-08-27 18:16:49 +04:00
get_first_and_last = $( TOOLCHAIN_PREFIX) nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
2013-11-19 08:45:31 +04:00
e n d i f
LOCAL_CHECKS = test " $$ ( $( get_first_and_last) | xargs echo) " != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0
i f e q ( L i n u x , $( OS_ARCH ) )
LOCAL_CHECKS += ; test " $$ ( $( TOOLCHAIN_PREFIX) readelf -l $1 | awk ' $1 == " LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
e n d i f