2008-07-22 16:27:55 +04:00
# vim:set ts=8 sw=8 sts=8 noet:
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Chase Phillips <chase@mozilla.org>
# Benjamin Smedberg <benjamin@smedbergs.us>
# Jeff Walden <jwalden+code@mit.edu>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
2010-04-02 18:46:27 +04:00
2008-07-22 16:27:55 +04:00
i f n d e f t o p s r c d i r
2010-04-02 18:46:27 +04:00
$( error topsrcdir was not set ) )
2008-07-22 16:27:55 +04:00
e n d i f
i f n d e f M O Z I L L A _ D I R
MOZILLA_DIR = $( MOZILLA_SRCDIR)
e n d i f
i f n d e f I N C L U D E D _ C O N F I G _ M K
i n c l u d e $( topsrcdir ) / c o n f i g / c o n f i g . m k
e n d i f
i f n d e f I N C L U D E D _ V E R S I O N _ M K
i n c l u d e $( topsrcdir ) / c o n f i g / v e r s i o n . m k
e n d i f
2010-04-02 18:46:27 +04:00
i f d e f S D K _ X P I D L S R C S
XPIDLSRCS += $( SDK_XPIDLSRCS)
e n d i f
i f d e f S D K _ H E A D E R S
EXPORTS += $( SDK_HEADERS)
e n d i f
2008-07-22 16:27:55 +04:00
REPORT_BUILD = @echo $( notdir $<)
i f e q ( $( OS_ARCH ) , O S 2 )
EXEC =
e l s e
EXEC = exec
e n d i f
2010-03-30 06:54:50 +04:00
# Don't copy xulrunner files at install time, when using system xulrunner
i f d e f S Y S T E M _ L I B X U L
SKIP_COPY_XULRUNNER = 1
e n d i f
2008-07-22 16:27:55 +04:00
# ELOG prints out failed command when building silently (gmake -s).
i f n e q ( , $( findstring -s ,$ ( MAKEFLAGS ) ) )
ELOG := $( EXEC) sh $( BUILD_TOOLS) /print-failed-commands.sh
e l s e
ELOG :=
e n d i f
i f e q ( , $( filter -out WINNT WINCE ,$ ( OS_ARCH ) ) )
2010-03-30 06:55:33 +04:00
_VPATH_SRCS = $( abspath $<)
2008-07-22 16:27:55 +04:00
e l s e
_VPATH_SRCS = $<
e n d i f
# Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed
VPATH += $( DIST) /lib
i f d e f L I B X U L _ S D K
VPATH += $( LIBXUL_SDK) /lib
e n d i f
i f d e f E X T R A _ D S O _ L I B S
EXTRA_DSO_LIBS := $( call EXPAND_MOZLIBNAME,$( EXTRA_DSO_LIBS) )
e n d i f
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
################################################################################
# Testing frameworks support
################################################################################
i f d e f E N A B L E _ T E S T S
i f d e f X P C S H E L L _ T E S T S
2010-10-22 13:51:44 +04:00
i f n d e f r e l a t i v e s r c d i r
$( error Must define relativesrcdir when defining XPCSHELL_TESTS .)
e n d i f
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
2009-02-23 21:31:05 +03:00
testxpcobjdir = $( MOZDEPTH) /_tests/xpcshell
2009-03-13 15:08:08 +03:00
d e f i n e _ I N S T A L L _ T E S T S
2011-07-13 11:30:11 +04:00
$( DIR_INSTALL ) $( wildcard $ ( srcdir ) /$ ( dir ) /*) $( testxpcobjdir ) / $( relativesrcdir ) / $( dir )
2009-03-13 15:08:08 +03:00
e n d e f # do not remove the blank line!
SOLO_FILE ?= $( error Specify a test filename in SOLO_FILE when using check-interactive or check-one)
libs ::
$( foreach dir,$( XPCSHELL_TESTS) ,$( _INSTALL_TESTS) )
2011-05-21 02:44:10 +04:00
$( PYTHON) $( MOZILLA_DIR) /build/xpccheck.py \
$( topsrcdir) \
$( topsrcdir) /$( MOZ_BUILD_APP) /test/xpcshell.ini \
$( addprefix $( topsrcdir) /$( relativesrcdir) /,$( XPCSHELL_TESTS) )
2009-03-13 15:08:08 +03:00
testxpcsrcdir = $( MOZILLA_SRCDIR) /testing/xpcshell
# Execute all tests in the $(XPCSHELL_TESTS) directories.
2010-03-26 19:14:45 +03:00
# See also $(MOZILLA_DIR)/testing/testsuite-targets.mk 'xpcshell-tests' target for global execution.
2009-05-04 03:06:15 +04:00
xpcshell-tests :
2010-03-26 19:14:45 +03:00
$( PYTHON) -u $( MOZILLA_DIR) /config/pythonpath.py \
-I$( MOZILLA_DIR) /build \
2009-08-28 19:28:27 +04:00
$( testxpcsrcdir) /runxpcshelltests.py \
2009-08-28 16:27:05 +04:00
--symbols-path= $( DIST) /crashreporter-symbols \
2011-07-06 00:16:59 +04:00
--build-info-json= $( MOZDEPTH) /mozinfo.json \
2010-11-21 07:21:42 +03:00
$( EXTRA_TEST_ARGS) \
2012-01-12 02:12:52 +04:00
$( LIBXUL_DIST) /bin/xpcshell \
2010-09-07 04:58:17 +04:00
$( foreach dir,$( XPCSHELL_TESTS) ,$( testxpcobjdir) /$( relativesrcdir) /$( dir) )
2009-03-13 15:08:08 +03:00
# Execute a single test, specified in $(SOLO_FILE), but don't automatically
# start the test. Instead, present the xpcshell prompt so the user can
# attach a debugger and then start the test.
2009-05-04 03:06:15 +04:00
check-interactive :
2010-03-26 19:14:45 +03:00
$( PYTHON) -u $( MOZILLA_DIR) /config/pythonpath.py \
-I$( MOZILLA_DIR) /build \
2009-08-28 19:28:27 +04:00
$( testxpcsrcdir) /runxpcshelltests.py \
2009-08-28 16:27:05 +04:00
--symbols-path= $( DIST) /crashreporter-symbols \
2011-07-06 00:16:59 +04:00
--build-info-json= $( MOZDEPTH) /mozinfo.json \
2009-08-28 19:28:27 +04:00
--test-path= $( SOLO_FILE) \
2010-08-10 08:16:32 +04:00
--profile-name= $( MOZ_APP_NAME) \
2009-08-28 19:28:27 +04:00
--interactive \
2012-01-12 02:12:52 +04:00
$( LIBXUL_DIST) /bin/xpcshell \
2010-09-07 04:58:17 +04:00
$( foreach dir,$( XPCSHELL_TESTS) ,$( testxpcobjdir) /$( relativesrcdir) /$( dir) )
2009-03-13 15:08:08 +03:00
# Execute a single test, specified in $(SOLO_FILE)
2009-05-04 03:06:15 +04:00
check-one :
2010-03-26 19:14:45 +03:00
$( PYTHON) -u $( MOZILLA_DIR) /config/pythonpath.py \
-I$( MOZILLA_DIR) /build \
2009-08-28 19:28:27 +04:00
$( testxpcsrcdir) /runxpcshelltests.py \
2009-08-28 16:27:05 +04:00
--symbols-path= $( DIST) /crashreporter-symbols \
2011-07-06 00:16:59 +04:00
--build-info-json= $( MOZDEPTH) /mozinfo.json \
2009-08-28 19:28:27 +04:00
--test-path= $( SOLO_FILE) \
2010-08-10 08:16:32 +04:00
--profile-name= $( MOZ_APP_NAME) \
--verbose \
$( EXTRA_TEST_ARGS) \
2012-01-12 02:12:52 +04:00
$( LIBXUL_DIST) /bin/xpcshell \
2010-09-07 04:58:17 +04:00
$( foreach dir,$( XPCSHELL_TESTS) ,$( testxpcobjdir) /$( relativesrcdir) /$( dir) )
2009-03-13 15:08:08 +03:00
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f # XPCSHELL_TESTS
i f d e f C P P _ U N I T _ T E S T S
# Compile the tests to $(DIST)/bin. Make lots of niceties available by default
# through TestHarness.h, by modifying the list of includes and the libs against
# which stuff links.
CPPSRCS += $( CPP_UNIT_TESTS)
SIMPLE_PROGRAMS += $( CPP_UNIT_TESTS:.cpp= $( BIN_SUFFIX) )
2010-04-02 18:46:27 +04:00
INCLUDES += -I$( DIST) /include/testing
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
LIBS += $( XPCOM_GLUE_LDOPTS) $( NSPR_LIBS)
# ...and run them the usual way
check ::
@$( EXIT_ON_ERROR) \
2010-03-27 18:48:52 +03:00
for f in $( subst .cpp,$( BIN_SUFFIX) ,$( CPP_UNIT_TESTS) ) ; do \
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
XPCOM_DEBUG_BREAK = stack-and-abort $( RUN_TEST_PROGRAM) $( DIST) /bin/$$ f; \
done
e n d i f # CPP_UNIT_TESTS
2009-05-04 03:06:15 +04:00
.PHONY : check xpcshell -tests check -interactive check -one
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f # ENABLE_TESTS
2008-07-22 16:27:55 +04:00
#
# Library rules
#
2011-06-04 00:43:40 +04:00
# If FORCE_STATIC_LIB is set, build a static library.
2008-07-22 16:27:55 +04:00
# Otherwise, build a shared library.
#
i f n d e f L I B R A R Y
2010-03-27 08:23:08 +03:00
i f d e f S T A T I C _ L I B R A R Y _ N A M E
2011-09-15 19:13:53 +04:00
REAL_LIBRARY := $( LIB_PREFIX) $( STATIC_LIBRARY_NAME) .$( LIB_SUFFIX)
# Only build actual library if it is installed in DIST/lib or SDK
i f e q ( , $( SDK_LIBRARY ) $( DIST_INSTALL ) $( NO_EXPAND_LIBS ) )
LIBRARY := $( REAL_LIBRARY) .$( LIBS_DESC_SUFFIX)
e l s e
LIBRARY := $( REAL_LIBRARY) $( REAL_LIBRARY) .$( LIBS_DESC_SUFFIX)
e n d i f
2010-03-27 08:23:08 +03:00
e n d i f # STATIC_LIBRARY_NAME
e n d i f # LIBRARY
2008-07-22 16:27:55 +04:00
i f n d e f H O S T _ L I B R A R Y
i f d e f H O S T _ L I B R A R Y _ N A M E
HOST_LIBRARY := $( LIB_PREFIX) $( HOST_LIBRARY_NAME) .$( LIB_SUFFIX)
e n d i f
e n d i f
i f d e f L I B R A R Y
2011-06-04 00:43:40 +04:00
i f d e f F O R C E _ S H A R E D _ L I B
2008-07-22 16:27:55 +04:00
i f d e f M K S H L I B
i f d e f L I B _ I S _ C _ O N L Y
MKSHLIB = $( MKCSHLIB)
e n d i f
2010-05-10 13:13:32 +04:00
i f n e q ( , $( filter OS 2 WINNT WINCE ,$ ( OS_ARCH ) ) )
IMPORT_LIBRARY := $( LIB_PREFIX) $( SHARED_LIBRARY_NAME) .$( IMPORT_LIB_SUFFIX)
e n d i f
i f e q ( O S 2 , $( OS_ARCH ) )
i f d e f S H O R T _ L I B N A M E
SHARED_LIBRARY_NAME := $( SHORT_LIBNAME)
e n d i f
e n d i f
2008-07-22 16:27:55 +04:00
i f d e f M A K E _ F R A M E W O R K
2010-03-27 08:23:08 +03:00
SHARED_LIBRARY := $( SHARED_LIBRARY_NAME)
2008-07-22 16:27:55 +04:00
e l s e
2010-03-27 08:23:08 +03:00
SHARED_LIBRARY := $( DLL_PREFIX) $( SHARED_LIBRARY_NAME) $( DLL_SUFFIX)
2008-07-22 16:27:55 +04:00
e n d i f
i f e q ( $( OS_ARCH ) , O S 2 )
DEF_FILE := $( SHARED_LIBRARY:.dll= .def)
e n d i f
EMBED_MANIFEST_AT = 2
e n d i f # MKSHLIB
2011-06-04 00:43:40 +04:00
e n d i f # FORCE_SHARED_LIB
2008-07-22 16:27:55 +04:00
e n d i f # LIBRARY
i f d e f F O R C E _ S T A T I C _ L I B
i f n d e f F O R C E _ S H A R E D _ L I B
SHARED_LIBRARY := $( NULL)
DEF_FILE := $( NULL)
IMPORT_LIBRARY := $( NULL)
e n d i f
e n d i f
i f d e f F O R C E _ S H A R E D _ L I B
i f n d e f F O R C E _ S T A T I C _ L I B
LIBRARY := $( NULL)
e n d i f
e n d i f
i f e q ( , $( filter -out WINNT WINCE ,$ ( OS_ARCH ) ) )
i f n d e f G N U _ C C
2009-08-28 19:28:27 +04:00
#
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
# Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
# directory. For parallel builds, this PDB file is shared and locked by
# MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
# without SP1, don't do parallel builds.
2008-07-22 16:27:55 +04:00
#
2008-11-17 15:56:38 +03:00
# The final PDB for libraries and programs is created by the linker and uses
# a different name from the single PDB file created by the compiler. See
# bug 462740.
#
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f d e f S I M P L E _ P R O G R A M S
COMPILE_PDBFILE = $( basename $( @F) ) .pdb
e l s e
2008-11-17 15:56:38 +03:00
COMPILE_PDBFILE = generated.pdb
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-11-17 15:56:38 +03:00
LINK_PDBFILE = $( basename $( @F) ) .pdb
2008-07-22 16:27:55 +04:00
i f d e f M O Z _ D E B U G
CODFILE = $( basename $( @F) ) .cod
e n d i f
i f d e f M O Z _ M A P I N F O
2010-03-27 08:23:08 +03:00
i f d e f S H A R E D _ L I B R A R Y _ N A M E
MAPFILE = $( SHARED_LIBRARY_NAME) .map
2008-07-22 16:27:55 +04:00
e l s e
MAPFILE = $( basename $( @F) ) .map
2010-03-27 08:23:08 +03:00
e n d i f # SHARED_LIBRARY_NAME
2008-07-22 16:27:55 +04:00
e n d i f # MOZ_MAPINFO
i f d e f D E F F I L E
2010-04-11 06:07:25 +04:00
OS_LDFLAGS += -DEF:$( call normalizepath,$( DEFFILE) )
2008-07-22 16:27:55 +04:00
EXTRA_DEPS += $( DEFFILE)
e n d i f
i f d e f M A P F I L E
OS_LDFLAGS += -MAP:$( MAPFILE)
e n d i f
e n d i f # !GNU_CC
e n d i f # WINNT
2010-03-28 19:36:42 +04:00
i f e q ( $( SOLARIS_SUNPRO_CXX ) , 1 )
i f e q ( 8 6 , $( findstring 86,$ ( OS_TEST ) ) )
OS_LDFLAGS += -M $( MOZILLA_DIR) /config/solaris_ia32.map
e n d i f # x86
e n d i f # Solaris Sun Studio C++
2008-07-22 16:27:55 +04:00
i f e q ( , $( filter -out WINNT WINCE ,$ ( HOST_OS_ARCH ) ) )
HOST_PDBFILE = $( basename $( @F) ) .pdb
e n d i f
i f n d e f T A R G E T S
2008-10-06 21:52:04 +04:00
TARGETS = $( LIBRARY) $( SHARED_LIBRARY) $( PROGRAM) $( SIMPLE_PROGRAMS) $( HOST_LIBRARY) $( HOST_PROGRAM) $( HOST_SIMPLE_PROGRAMS)
2008-07-22 16:27:55 +04:00
e n d i f
i f n d e f O B J S
_OBJS = \
$( JRI_STUB_CFILES) \
$( addsuffix .$( OBJ_SUFFIX) , $( JMC_GEN) ) \
$( CSRCS:.c= .$( OBJ_SUFFIX) ) \
2010-08-10 08:16:32 +04:00
$( SSRCS:.S= .$( OBJ_SUFFIX) ) \
2008-07-22 16:27:55 +04:00
$( patsubst %.cc,%.$( OBJ_SUFFIX) ,$( CPPSRCS:.cpp= .$( OBJ_SUFFIX) ) ) \
$( CMSRCS:.m= .$( OBJ_SUFFIX) ) \
$( CMMSRCS:.mm= .$( OBJ_SUFFIX) ) \
$( ASFILES:.$( ASM_SUFFIX) = .$( OBJ_SUFFIX) )
OBJS = $( strip $( _OBJS) )
e n d i f
i f n d e f H O S T _ O B J S
_HOST_OBJS = \
$( addprefix host_,$( HOST_CSRCS:.c= .$( OBJ_SUFFIX) ) ) \
$( addprefix host_,$( patsubst %.cc,%.$( OBJ_SUFFIX) ,$( HOST_CPPSRCS:.cpp= .$( OBJ_SUFFIX) ) ) ) \
$( addprefix host_,$( HOST_CMSRCS:.m= .$( OBJ_SUFFIX) ) ) \
$( addprefix host_,$( HOST_CMMSRCS:.mm= .$( OBJ_SUFFIX) ) )
HOST_OBJS = $( strip $( _HOST_OBJS) )
e n d i f
LIBOBJS := $( addprefix \" , $( OBJS) )
LIBOBJS := $( addsuffix \" , $( LIBOBJS) )
i f n d e f M O Z _ A U T O _ D E P S
2010-04-02 18:46:27 +04:00
i f n e q ( , $( OBJS ) $( XPIDLSRCS ) $( SIMPLE_PROGRAMS ) )
2008-07-22 16:27:55 +04:00
MDDEPFILES = $( addprefix $( MDDEPDIR) /,$( OBJS:.$( OBJ_SUFFIX) = .pp) )
i f n d e f N O _ G E N _ X P T
2011-08-24 21:01:45 +04:00
MDDEPFILES += $( addprefix $( MDDEPDIR) /,$( XPIDLSRCS:.idl= .h.pp) $( XPIDLSRCS:.idl= .xpt.pp) )
2008-07-22 16:27:55 +04:00
e n d i f
e n d i f
e n d i f
ALL_TRASH = \
$( GARBAGE) $( TARGETS) $( OBJS) $( PROGOBJS) LOGS TAGS a.out \
2008-08-24 02:36:14 +04:00
$( filter-out $( ASFILES) ,$( OBJS:.$( OBJ_SUFFIX) = .s) ) $( OBJS:.$( OBJ_SUFFIX) = .ii) \
2008-07-22 16:27:55 +04:00
$( OBJS:.$( OBJ_SUFFIX) = .i) \
$( HOST_PROGOBJS) $( HOST_OBJS) $( IMPORT_LIBRARY) $( DEF_FILE) \
$( EXE_DEF_FILE) so_locations _gen _stubs $( wildcard *.res) $( wildcard *.RES) \
$( wildcard *.pdb) $( CODFILE) $( MAPFILE) $( IMPORT_LIBRARY) \
$( SHARED_LIBRARY:$( DLL_SUFFIX) = .exp) $( wildcard *.ilk) \
$( PROGRAM:$( BIN_SUFFIX) = .exp) $( SIMPLE_PROGRAMS:$( BIN_SUFFIX) = .exp) \
$( PROGRAM:$( BIN_SUFFIX) = .lib) $( SIMPLE_PROGRAMS:$( BIN_SUFFIX) = .lib) \
$( SIMPLE_PROGRAMS:$( BIN_SUFFIX) = .$( OBJ_SUFFIX) ) \
$( wildcard gts_tmp_*) $( LIBRARY:%.a= .%.timestamp)
ALL_TRASH_DIRS = \
$( GARBAGE_DIRS) /no-such-file
i f d e f S I M P L E _ P R O G R A M S
GARBAGE += $( SIMPLE_PROGRAMS:%= %.$( OBJ_SUFFIX) )
e n d i f
i f d e f H O S T _ S I M P L E _ P R O G R A M S
GARBAGE += $( HOST_SIMPLE_PROGRAMS:%= %.$( OBJ_SUFFIX) )
e n d i f
#
# the Solaris WorkShop template repository cache. it occasionally can get
# out of sync, so targets like clobber should kill it.
#
2009-08-04 19:13:06 +04:00
i f e q ( $( SOLARIS_SUNPRO_CXX ) , 1 )
2008-07-22 16:27:55 +04:00
GARBAGE_DIRS += SunWS_cache
e n d i f
i f e q ( $( OS_ARCH ) , O p e n V M S )
GARBAGE += $( wildcard *.*_defines)
i f d e f S H A R E D _ L I B R A R Y
VMS_SYMVEC_FILE = $( SHARED_LIBRARY:$( DLL_SUFFIX) = _symvec.opt)
i f d e f M O Z _ D E B U G
VMS_SYMVEC_FILE_MODULE = $( MOZILLA_SRCDIR) /build/unix/vms/$( notdir $( SHARED_LIBRARY:$( DLL_SUFFIX) = _dbg_symvec.opt) )
e l s e
VMS_SYMVEC_FILE_MODULE = $( MOZILLA_SRCDIR) /build/unix/vms/$( notdir $( SHARED_LIBRARY:$( DLL_SUFFIX) = _symvec.opt) )
e n d i f
VMS_SYMVEC_FILE_COMP = $( MOZILLA_SRCDIR) /build/unix/vms/component_symvec.opt
GARBAGE += $( VMS_SYMVEC_FILE)
i f d e f I S _ C O M P O N E N T
DSO_LDOPTS := $( filter-out -auto_symvec,$( DSO_LDOPTS) ) $( VMS_SYMVEC_FILE)
e n d i f
e n d i f
e n d i f
XPIDL_GEN_DIR = _xpidlgen
i f d e f M O Z _ U P D A T E _ X T E R M
# Its good not to have a newline at the end of the titlebar string because it
# makes the make -s output easier to read. Echo -n does not work on all
# platforms, but we can trick sed into doing it.
2010-03-31 18:11:32 +04:00
UPDATE_TITLE = sed -e " s!Y! $( 1) in $( shell $( BUILD_TOOLS) /print-depth-path.sh) / $( 2) ! " $( MOZILLA_DIR) /config/xterm.str;
2008-07-22 16:27:55 +04:00
e n d i f
2010-03-31 18:11:32 +04:00
d e f i n e S U B M A K E # $(call SUBMAKE,target,directory)
2010-07-27 15:49:47 +04:00
+ @ $( UPDATE_TITLE )
2010-03-31 18:11:32 +04:00
+ @ $( MAKE ) $( if $ ( 2) ,-C $ ( 2) ) $( 1)
e n d e f # The extra line is important here! don't delete it
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( DIRS ) ) )
2008-07-22 16:27:55 +04:00
LOOP_OVER_DIRS = \
2010-03-31 18:11:32 +04:00
$( foreach dir,$( DIRS) ,$( call SUBMAKE,$@ ,$( dir) ) )
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-07-22 16:27:55 +04:00
2008-11-05 17:46:40 +03:00
# we only use this for the makefiles target and other stuff that doesn't matter
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( PARALLEL_DIRS ) ) )
2008-11-05 17:46:40 +03:00
LOOP_OVER_PARALLEL_DIRS = \
2010-03-31 18:11:32 +04:00
$( foreach dir,$( PARALLEL_DIRS) ,$( call SUBMAKE,$@ ,$( dir) ) )
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-11-05 17:46:40 +03:00
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( STATIC_DIRS ) ) )
2008-07-22 16:27:55 +04:00
LOOP_OVER_STATIC_DIRS = \
2010-03-31 18:11:32 +04:00
$( foreach dir,$( STATIC_DIRS) ,$( call SUBMAKE,$@ ,$( dir) ) )
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-07-22 16:27:55 +04:00
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( TOOL_DIRS ) ) )
2008-07-22 16:27:55 +04:00
LOOP_OVER_TOOL_DIRS = \
2010-03-31 18:11:32 +04:00
$( foreach dir,$( TOOL_DIRS) ,$( call SUBMAKE,$@ ,$( dir) ) )
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-07-22 16:27:55 +04:00
2008-11-05 17:46:40 +03:00
i f d e f P A R A L L E L _ D I R S
# create a bunch of fake targets for order-only processing
PARALLEL_DIRS_export = $( addsuffix _export,$( PARALLEL_DIRS) )
PARALLEL_DIRS_libs = $( addsuffix _libs,$( PARALLEL_DIRS) )
PARALLEL_DIRS_tools = $( addsuffix _tools,$( PARALLEL_DIRS) )
.PHONY : $( PARALLEL_DIRS_export ) $( PARALLEL_DIRS_libs ) $( PARALLEL_DIRS_tools )
e n d i f
2008-07-22 16:27:55 +04:00
#
# Now we can differentiate between objects used to build a library, and
# objects used to build an executable in the same directory.
#
i f n d e f P R O G O B J S
PROGOBJS = $( OBJS)
e n d i f
i f n d e f H O S T _ P R O G O B J S
HOST_PROGOBJS = $( HOST_OBJS)
e n d i f
# MAKE_DIRS: List of directories to build while looping over directories.
2008-12-04 17:46:34 +03:00
# A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
# variables we know to check can just set NEED_MDDEPDIR explicitly.
2010-04-02 18:46:27 +04:00
i f n e q ( , $( OBJS ) $( XPIDLSRCS ) $( SIMPLE_PROGRAMS ) $( NEED_MDDEPDIR ) )
2008-12-04 17:46:34 +03:00
MAKE_DIRS += $( CURDIR) /$( MDDEPDIR)
2008-07-22 16:27:55 +04:00
GARBAGE_DIRS += $( MDDEPDIR)
e n d i f
#
# Tags: emacs (etags), vi (ctags)
# TAG_PROGRAM := ctags -L -
#
TAG_PROGRAM = xargs etags -a
#
# Turn on C++ linking if we have any .cpp or .mm files
# (moved this from config.mk so that config.mk can be included
# before the CPPSRCS are defined)
#
2012-05-12 02:39:06 +04:00
i f n e q ( $( HOST_CPPSRCS ) $( HOST_CMMSRCS ) , )
HOST_CPP_PROG_LINK = 1
2008-07-22 16:27:55 +04:00
e n d i f
#
# This will strip out symbols that the component should not be
# exporting from the .dynsym section.
#
i f d e f I S _ C O M P O N E N T
EXTRA_DSO_LDOPTS += $( MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
e n d i f # IS_COMPONENT
#
# Enforce the requirement that MODULE_NAME must be set
# for components in static builds
#
i f d e f I S _ C O M P O N E N T
i f d e f E X P O R T _ L I B R A R Y
i f n d e f F O R C E _ S H A R E D _ L I B
i f n d e f M O D U L E _ N A M E
$( error MODULE_NAME is required for components which may be used in static builds )
e n d i f
e n d i f
e n d i f
e n d i f
#
# MacOS X specific stuff
#
i f e q ( $( OS_ARCH ) , D a r w i n )
i f d e f S H A R E D _ L I B R A R Y
i f d e f I S _ C O M P O N E N T
EXTRA_DSO_LDOPTS += -bundle
e l s e
EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$( SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
e n d i f
e n d i f
e n d i f
#
# On NetBSD a.out systems, use -Bsymbolic. This fixes what would otherwise be
# fatal symbol name clashes between components.
#
i f e q ( $( OS_ARCH ) , N e t B S D )
i f e q ( $( DLL_SUFFIX ) , . s o . 1 . 0 )
i f d e f I S _ C O M P O N E N T
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
e n d i f
e n d i f
e n d i f
i f e q ( $( OS_ARCH ) , F r e e B S D )
i f d e f I S _ C O M P O N E N T
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
e n d i f
e n d i f
i f e q ( $( OS_ARCH ) , N e t B S D )
i f n e q ( , $( filter arc cobalt hpcmips mipsco newsmips pmax sgimips ,$ ( OS_TEST ) ) )
i f e q ( $( MODULE ) , l a y o u t )
OS_CFLAGS += -Wa,-xgot
OS_CXXFLAGS += -Wa,-xgot
e n d i f
e n d i f
e n d i f
#
# HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
# which uses internal symbols first
#
i f e q ( $( OS_ARCH ) , H P - U X )
i f d e f I S _ C O M P O N E N T
i f e q ( $( GNU_CC ) $( GNU_CXX ) , )
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
i f n e q ( $( HAS_EXTRAEXPORTS ) , 1 )
MKSHLIB += -Wl,+eNSGetModule -Wl,+eerrno
MKCSHLIB += +eNSGetModule +eerrno
i f n e q ( $( OS_TEST ) , i a 6 4 )
MKSHLIB += -Wl,+e_shlInit
MKCSHLIB += +e_shlInit
e n d i f # !ia64
e n d i f # !HAS_EXTRAEXPORTS
e n d i f # non-gnu compilers
e n d i f # IS_COMPONENT
e n d i f # HP-UX
i f e q ( $( OS_ARCH ) , A I X )
i f d e f I S _ C O M P O N E N T
i f n e q ( $( HAS_EXTRAEXPORTS ) , 1 )
MKSHLIB += -bE:$( MOZILLA_DIR) /build/unix/aix.exp -bnoexpall
MKCSHLIB += -bE:$( MOZILLA_DIR) /build/unix/aix.exp -bnoexpall
e n d i f # HAS_EXTRAEXPORTS
e n d i f # IS_COMPONENT
e n d i f # AIX
#
# OSF1: add -B symbolic flag for components
#
i f e q ( $( OS_ARCH ) , O S F 1 )
i f d e f I S _ C O M P O N E N T
i f e q ( $( GNU_CC ) $( GNU_CXX ) , )
EXTRA_DSO_LDOPTS += -B symbolic
e n d i f
e n d i f
e n d i f
#
# Linux: add -Bsymbolic flag for components
#
i f e q ( $( OS_ARCH ) , L i n u x )
i f d e f I S _ C O M P O N E N T
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
e n d i f
e n d i f
2010-08-10 08:16:32 +04:00
#
# GNU doesn't have path length limitation
#
i f e q ( $( OS_ARCH ) , G N U )
OS_CPPFLAGS += -DPATH_MAX= 1024 -DMAXPATHLEN= 1024
e n d i f
2008-07-22 16:27:55 +04:00
#
# MINGW32
#
i f e q ( $( OS_ARCH ) , W I N N T )
i f d e f G N U _ C C
i f n d e f I S _ C O M P O N E N T
DSO_LDOPTS += -Wl,--out-implib -Wl,$( IMPORT_LIBRARY)
e n d i f
e n d i f
e n d i f
i f e q ( $( USE_TVFS ) , 1 )
IFLAGS1 = -rb
IFLAGS2 = -rb
e l s e
IFLAGS1 = -m 644
IFLAGS2 = -m 755
e n d i f
i f e q ( _ W I N N T , $( GNU_CC ) _ $( OS_ARCH ) )
OUTOPTION = -Fo# eol
e l s e
OUTOPTION = -o # eol
e n d i f # WINNT && !GNU_CC
i f n e q ( , $( filter WINCE ,$ ( OS_ARCH ) ) )
OUTOPTION = -Fo# eol
e n d i f
2010-05-11 18:51:56 +04:00
i f e q ( $( OS_ARCH ) , W I N C E )
2008-07-22 16:27:55 +04:00
OUTOPTION = -Fo# eol
HOST_OUTOPTION = -Fo# eol
e l s e
i f e q ( , $( CROSS_COMPILE ) )
HOST_OUTOPTION = $( OUTOPTION)
e l s e
HOST_OUTOPTION = -o # eol
e n d i f
e n d i f
################################################################################
# SUBMAKEFILES: List of Makefiles for next level down.
# This is used to update or create the Makefiles before invoking them.
2008-11-05 17:46:40 +03:00
SUBMAKEFILES += $( addsuffix /Makefile, $( DIRS) $( TOOL_DIRS) $( PARALLEL_DIRS) )
2008-07-22 16:27:55 +04:00
# The root makefile doesn't want to do a plain export/libs, because
# of the tiers and because of libxul. Suppress the default rules in favor
# of something else. Makefiles which use this var *must* provide a sensible
# default rule before including rules.mk
i f n d e f S U P P R E S S _ D E F A U L T _ R U L E S
i f d e f T I E R S
default all alldep ::
2010-03-31 18:11:32 +04:00
$( foreach tier,$( TIERS) ,$( call SUBMAKE,tier_$( tier) ) )
2008-07-22 16:27:55 +04:00
e l s e
default all ::
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( STATIC_DIRS ) ) )
2010-03-31 18:11:32 +04:00
$( foreach dir,$( STATIC_DIRS) ,$( call SUBMAKE,,$( dir) ) )
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2008-07-22 16:27:55 +04:00
$( MAKE) export
$( MAKE) libs
$( MAKE) tools
# Do depend as well
alldep ::
$( MAKE) export
$( MAKE) depend
$( MAKE) libs
$( MAKE) tools
e n d i f # TIERS
e n d i f # SUPPRESS_DEFAULT_RULES
i f e q ( $( filter s ,$ ( MAKEFLAGS ) ) , )
ECHO := echo
QUIET :=
e l s e
ECHO := true
QUIET := -q
e n d i f
MAKE_TIER_SUBMAKEFILES = +$( if $( tier_$* _dirs) ,$( MAKE) $( addsuffix /Makefile,$( tier_$* _dirs) ) )
2010-03-31 18:11:32 +04:00
export_tier_% :
2008-07-22 16:27:55 +04:00
@$( ECHO) " $@ "
@$( MAKE_TIER_SUBMAKEFILES)
2010-03-31 18:11:32 +04:00
$( foreach dir,$( tier_$* _dirs) ,$( call SUBMAKE,export,$( dir) ) )
2008-07-22 16:27:55 +04:00
libs_tier_% :
@$( ECHO) " $@ "
@$( MAKE_TIER_SUBMAKEFILES)
2010-03-31 18:11:32 +04:00
$( foreach dir,$( tier_$* _dirs) ,$( call SUBMAKE,libs,$( dir) ) )
2008-07-22 16:27:55 +04:00
tools_tier_% :
@$( ECHO) " $@ "
@$( MAKE_TIER_SUBMAKEFILES)
2010-03-31 18:11:32 +04:00
$( foreach dir,$( tier_$* _dirs) ,$( call SUBMAKE,tools,$( dir) ) )
2008-07-22 16:27:55 +04:00
$(foreach tier,$(TIERS),tier_$(tier)) ::
@$( ECHO) " $@ : $( $@ _staticdirs) $( $@ _dirs) "
2010-03-31 18:11:32 +04:00
$( foreach dir,$( $@ _staticdirs) ,$( call SUBMAKE,,$( dir) ) )
2008-07-22 16:27:55 +04:00
$( MAKE) export_$@
$( MAKE) libs_$@
2010-08-10 08:16:32 +04:00
$( MAKE) tools_$@
2008-07-22 16:27:55 +04:00
# Do everything from scratch
everything ::
$( MAKE) clean
$( MAKE) alldep
# Add dummy depend target for tinderboxes
depend ::
# Target to only regenerate makefiles
makefiles : $( SUBMAKEFILES )
2008-11-05 17:46:40 +03:00
i f n e q ( , $( DIRS ) $( TOOL_DIRS ) $( PARALLEL_DIRS ) )
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
e n d i f
2008-11-05 17:46:40 +03:00
i f d e f P A R A L L E L _ D I R S
export :: $( PARALLEL_DIRS_export )
$(PARALLEL_DIRS_export) : %_export : %/Makefile
2010-03-31 18:11:32 +04:00
+@$( call SUBMAKE,export,$* )
2008-11-05 17:46:40 +03:00
e n d i f
2010-04-02 18:46:27 +04:00
export :: $( SUBMAKEFILES ) $( MAKE_DIRS ) $( if $ ( XPIDLSRCS ) ,$ ( IDL_DIR ) )
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
2008-11-05 17:46:40 +03:00
i f d e f P A R A L L E L _ D I R S
tools :: $( PARALLEL_DIRS_tools )
$(PARALLEL_DIRS_tools) : %_tools : %/Makefile
2010-03-31 18:11:32 +04:00
+@$( call SUBMAKE,tools,$* )
2008-11-05 17:46:40 +03:00
e n d i f
2008-07-22 16:27:55 +04:00
tools :: $( SUBMAKEFILES ) $( MAKE_DIRS )
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_DIRS)
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( strip $ ( TOOL_DIRS ) ) )
2010-03-31 18:11:32 +04:00
$( foreach dir,$( TOOL_DIRS) ,$( call SUBMAKE,libs,$( dir) ) )
2008-07-22 16:27:55 +04:00
e n d i f
#
# Rule to create list of libraries for final link
#
export ::
i f d e f L I B R A R Y _ N A M E
i f d e f E X P O R T _ L I B R A R Y
2011-06-04 00:43:40 +04:00
i f n d e f I S _ C O M P O N E N T
2010-03-27 08:23:08 +03:00
$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_LINK_LIBS) $( STATIC_LIBRARY_NAME)
2011-06-04 00:43:40 +04:00
e n d i f # !IS_COMPONENT
2008-07-22 16:27:55 +04:00
e n d i f # EXPORT_LIBRARY
e n d i f # LIBRARY_NAME
2011-09-15 19:13:53 +04:00
i f n e q ( , $( filter -out %.$ ( LIB_SUFFIX ) ,$ ( SHARED_LIBRARY_LIBS ) ) )
$( error SHARED_LIBRARY_LIBS must contain .$ ( LIB_SUFFIX ) files only )
e n d i f
2010-03-03 17:11:47 +03:00
2011-09-15 19:13:53 +04:00
DO_EXPAND_LIBS = $( foreach f,$( 1) ,$( if $( filter %.$( LIB_SUFFIX) ,$( f) ) ,$( if $( wildcard $( f) .$( LIBS_DESC_SUFFIX) ) ,$( f) .$( LIBS_DESC_SUFFIX) ,$( if $( wildcard $( f) ) ,$( f) ) ) ) )
LIBS_DEPS = $( call DO_EXPAND_LIBS,$( filter %.$( LIB_SUFFIX) ,$( LIBS) ) )
SHARED_LIBRARY_LIBS_DEPS = $( call DO_EXPAND_LIBS,$( SHARED_LIBRARY_LIBS) )
HOST_LIBS_DEPS = $( filter %.$( LIB_SUFFIX) ,$( HOST_LIBS) )
DSO_LDOPTS_DEPS = $( call DO_EXPAND_LIBS,$( EXTRA_DSO_LIBS) $( filter %.$( LIB_SUFFIX) , $( EXTRA_DSO_LDOPTS) ) )
2010-03-03 17:11:47 +03:00
2009-01-22 19:49:22 +03:00
# Dependencies which, if modified, should cause everything to rebuild
2010-02-12 01:59:32 +03:00
GLOBAL_DEPS += Makefile Makefile.in $( DEPTH) /config/autoconf.mk $( topsrcdir) /config/config.mk
2009-01-22 19:49:22 +03:00
2008-07-22 16:27:55 +04:00
##############################################
2008-11-05 17:46:40 +03:00
i f d e f P A R A L L E L _ D I R S
libs :: $( PARALLEL_DIRS_libs )
$(PARALLEL_DIRS_libs) : %_libs : %/Makefile
2010-03-31 18:11:32 +04:00
+@$( call SUBMAKE,libs,$* )
2008-11-05 17:46:40 +03:00
e n d i f
2011-09-15 19:13:53 +04:00
i f d e f E X P O R T _ L I B R A R Y
i f e q ( $( EXPORT_LIBRARY ) , 1 )
i f d e f I S _ C O M P O N E N T
EXPORT_LIBRARY = $( MOZDEPTH) /staticlib/components
e l s e
EXPORT_LIBRARY = $( MOZDEPTH) /staticlib
e n d i f
e l s e
# If EXPORT_LIBRARY has a value, we'll be installing there. We also need to cleanup there
GARBAGE += $( foreach lib,$( LIBRARY) ,$( EXPORT_LIBRARY) /$( lib) )
e n d i f
e n d i f # EXPORT_LIBRARY
2008-10-06 21:52:04 +04:00
libs :: $( SUBMAKEFILES ) $( MAKE_DIRS ) $( HOST_LIBRARY ) $( LIBRARY ) $( SHARED_LIBRARY ) $( IMPORT_LIBRARY ) $( HOST_PROGRAM ) $( PROGRAM ) $( HOST_SIMPLE_PROGRAMS ) $( SIMPLE_PROGRAMS )
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
i f d e f L I B R A R Y
i f d e f E X P O R T _ L I B R A R Y # Stage libs that will be linked into a static build
2011-09-15 19:13:53 +04:00
$( INSTALL) $( IFLAGS1) $( LIBRARY) $( EXPORT_LIBRARY)
2008-07-22 16:27:55 +04:00
e n d i f # EXPORT_LIBRARY
i f d e f D I S T _ I N S T A L L
i f d e f I S _ C O M P O N E N T
$( error Shipping static component libs makes no sense.)
e l s e
$( INSTALL) $( IFLAGS1) $( LIBRARY) $( DIST) /lib
e n d i f
e n d i f # DIST_INSTALL
e n d i f # LIBRARY
i f d e f S H A R E D _ L I B R A R Y
i f d e f I S _ C O M P O N E N T
$( INSTALL) $( IFLAGS2) $( SHARED_LIBRARY) $( FINAL_TARGET) /components
$( ELF_DYNSTR_GC) $( FINAL_TARGET) /components/$( SHARED_LIBRARY)
2010-07-04 16:37:13 +04:00
i f n d e f N O _ C O M P O N E N T S _ M A N I F E S T
2010-08-09 21:12:17 +04:00
@$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_TARGET) /chrome.manifest "manifest components/components.manifest"
2010-07-04 16:37:13 +04:00
@$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_TARGET) /components/components.manifest " binary-component $( SHARED_LIBRARY) "
e n d i f
2008-07-22 16:27:55 +04:00
i f d e f B E O S _ A D D O N _ W O R K A R O U N D
( cd $( FINAL_TARGET) /components && $( CC) -nostart -o $( SHARED_LIBRARY) .stub $( SHARED_LIBRARY) )
e n d i f
e l s e # ! IS_COMPONENT
i f n e q ( , $( filter OS 2 WINNT WINCE ,$ ( OS_ARCH ) ) )
2011-08-25 15:46:12 +04:00
i f n d e f N O _ I N S T A L L _ I M P O R T _ L I B R A R Y
2008-07-22 16:27:55 +04:00
$( INSTALL) $( IFLAGS2) $( IMPORT_LIBRARY) $( DIST) /lib
2011-08-25 15:46:12 +04:00
e n d i f
2008-07-22 16:27:55 +04:00
e l s e
$( INSTALL) $( IFLAGS2) $( SHARED_LIBRARY) $( DIST) /lib
e n d i f
$( INSTALL) $( IFLAGS2) $( SHARED_LIBRARY) $( FINAL_TARGET)
i f d e f B E O S _ A D D O N _ W O R K A R O U N D
( cd $( FINAL_TARGET) && $( CC) -nostart -o $( SHARED_LIBRARY) .stub $( SHARED_LIBRARY) )
e n d i f
e n d i f # IS_COMPONENT
e n d i f # SHARED_LIBRARY
i f d e f P R O G R A M
$( INSTALL) $( IFLAGS2) $( PROGRAM) $( FINAL_TARGET)
e n d i f
i f d e f S I M P L E _ P R O G R A M S
$( INSTALL) $( IFLAGS2) $( SIMPLE_PROGRAMS) $( FINAL_TARGET)
e n d i f
i f d e f H O S T _ P R O G R A M
$( INSTALL) $( IFLAGS2) $( HOST_PROGRAM) $( DIST) /host/bin
e n d i f
i f d e f H O S T _ S I M P L E _ P R O G R A M S
$( INSTALL) $( IFLAGS2) $( HOST_SIMPLE_PROGRAMS) $( DIST) /host/bin
e n d i f
i f d e f H O S T _ L I B R A R Y
$( INSTALL) $( IFLAGS1) $( HOST_LIBRARY) $( DIST) /host/lib
e n d i f
e n d i f # !NO_DIST_INSTALL
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_DIRS)
2008-07-22 16:27:55 +04:00
##############################################
i f n d e f N O _ P R O F I L E _ G U I D E D _ O P T I M I Z E
2010-03-04 15:43:51 +03:00
i f d e f M O Z _ P R O F I L E _ U S E
2010-08-10 08:16:32 +04:00
i f e q ( $( OS_ARCH ) _ $( GNU_CC ) , W I N N T _ )
2010-03-04 15:43:51 +03:00
# When building with PGO, we have to make sure to re-link
# in the MOZ_PROFILE_USE phase if we linked in the
# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink
# file in the link rule in the GENERATE phase to indicate
# that we need a relink.
2008-07-22 16:27:55 +04:00
i f d e f S H A R E D _ L I B R A R Y
2010-03-04 15:43:51 +03:00
$(SHARED_LIBRARY) : pgo .relink
2008-07-22 16:27:55 +04:00
e n d i f
i f d e f P R O G R A M
2010-03-04 15:43:51 +03:00
$(PROGRAM) : pgo .relink
2008-07-22 16:27:55 +04:00
e n d i f
# In the second pass, we need to merge the pgc files into the pgd file.
# The compiler would do this for us automatically if they were in the right
# place, but they're in dist/bin.
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( SHARED_LIBRARY ) $( PROGRAM ) )
2008-07-22 16:27:55 +04:00
export ::
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f d e f P R O G R A M
2008-07-22 16:27:55 +04:00
$( PYTHON) $( MOZILLA_SRCDIR) /build/win32/pgomerge.py \
2011-11-28 10:26:14 +04:00
$( PROGRAM:$( BIN_SUFFIX) = ) $( DIST) /bin
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
i f d e f S H A R E D _ L I B R A R Y
2011-11-28 10:26:14 +04:00
$( PYTHON) $( MOZILLA_SRCDIR) /build/win32/pgomerge.py \
$( SHARED_LIBRARY_NAME) $( DIST) /bin
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
e n d i f
2010-03-04 15:43:51 +03:00
e n d i f # SHARED_LIBRARY || PROGRAM
2008-07-22 16:27:55 +04:00
e n d i f # WINNT_
e n d i f # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
e n d i f # NO_PROFILE_GUIDED_OPTIMIZE
##############################################
checkout :
$( PYTHON) $( topsrcdir) /client.py checkout
clean clobber realclean clobber_all :: $( SUBMAKEFILES )
2012-02-29 14:40:46 +04:00
-rm -f $( ALL_TRASH)
-rm -rf $( ALL_TRASH_DIRS)
2010-03-31 18:11:32 +04:00
$( foreach dir,$( PARALLEL_DIRS) $( DIRS) $( STATIC_DIRS) $( TOOL_DIRS) ,-$( call SUBMAKE,$@ ,$( dir) ) )
2008-07-22 16:27:55 +04:00
distclean :: $( SUBMAKEFILES )
2010-03-31 18:11:32 +04:00
$( foreach dir,$( PARALLEL_DIRS) $( DIRS) $( STATIC_DIRS) $( TOOL_DIRS) ,-$( call SUBMAKE,$@ ,$( dir) ) )
2012-02-29 14:40:46 +04:00
-rm -rf $( ALL_TRASH_DIRS)
-rm -f $( ALL_TRASH) \
2008-07-22 16:27:55 +04:00
Makefile .HSancillary \
$( wildcard *.$( OBJ_SUFFIX) ) $( wildcard *.ho) $( wildcard host_*.o*) \
$( wildcard *.$( LIB_SUFFIX) ) $( wildcard *$( DLL_SUFFIX) ) \
$( wildcard *.$( IMPORT_LIB_SUFFIX) )
2008-10-11 05:04:07 +04:00
i f e q ( $( OS_ARCH ) , O S 2 )
2012-02-29 14:40:46 +04:00
-rm -f $( PROGRAM:.exe= .map)
2008-07-22 16:27:55 +04:00
e n d i f
alltags :
2012-02-29 14:40:46 +04:00
rm -f TAGS
2008-07-22 16:27:55 +04:00
find $( topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $( TAG_PROGRAM)
#
# PROGRAM = Foo
# creates OBJS, links with LIBS to create Foo
#
2009-01-22 19:49:22 +03:00
$(PROGRAM) : $( PROGOBJS ) $( LIBS_DEPS ) $( EXTRA_DEPS ) $( EXE_DEF_FILE ) $( RESFILE ) $( GLOBAL_DEPS )
2012-02-29 14:40:46 +04:00
@rm -f $@ .manifest
2008-07-22 16:27:55 +04:00
i f e q ( W I N C E , $( OS_ARCH ) )
2011-12-27 22:18:29 +04:00
$( EXPAND_LD) -NOLOGO -OUT:$@ $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( PROGOBJS) $( RESFILE) $( LIBS) $( EXTRA_LIBS) $( OS_LIBS)
2008-07-22 16:27:55 +04:00
e l s e
i f e q ( _ W I N N T , $( GNU_CC ) _ $( OS_ARCH ) )
2011-12-27 22:18:29 +04:00
$( EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$( LINK_PDBFILE) $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( PROGOBJS) $( RESFILE) $( LIBS) $( EXTRA_LIBS) $( OS_LIBS)
2008-07-22 16:27:55 +04:00
i f d e f M S M A N I F E S T _ T O O L
@if test -f $@ .manifest; then \
if test -f " $( srcdir) / $@ .manifest " ; then \
2010-03-04 16:03:43 +03:00
echo " Embedding manifest from $( srcdir) / $@ .manifest and $@ .manifest " ; \
2008-07-22 16:27:55 +04:00
mt.exe -NOLOGO -MANIFEST " $( win_srcdir) / $@ .manifest " $@ .manifest -OUTPUTRESOURCE:$@ \; 1; \
else \
2010-03-04 16:03:43 +03:00
echo " Embedding manifest from $@ .manifest " ; \
2008-07-22 16:27:55 +04:00
mt.exe -NOLOGO -MANIFEST $@ .manifest -OUTPUTRESOURCE:$@ \; 1; \
fi ; \
2010-03-04 16:03:43 +03:00
elif test -f " $( srcdir) / $@ .manifest " ; then \
echo " Embedding manifest from $( srcdir) / $@ .manifest " ; \
mt.exe -NOLOGO -MANIFEST " $( win_srcdir) / $@ .manifest " -OUTPUTRESOURCE:$@ \; 1; \
2008-07-22 16:27:55 +04:00
fi
e n d i f # MSVC with manifest tool
2010-03-04 15:43:51 +03:00
i f d e f M O Z _ P R O F I L E _ G E N E R A T E
# touch it a few seconds into the future to work around FAT's
# 2-second granularity
touch -t ` date +%Y%m%d%H%M.%S -d "now+5seconds" ` pgo.relink
e n d i f
e l s e # !WINNT || GNU_CC
2011-12-27 22:18:29 +04:00
$( EXPAND_CCC) -o $@ $( CXXFLAGS) $( PROGOBJS) $( RESFILE) $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( WRAP_LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( LIBS_DIR) $( LIBS) $( OS_LIBS) $( EXTRA_LIBS) $( BIN_FLAGS) $( EXE_DEF_FILE)
2008-07-22 16:27:55 +04:00
e n d i f # WINNT && !GNU_CC
e n d i f # WINCE
i f d e f E N A B L E _ S T R I P
$( STRIP) $@
e n d i f
i f d e f M O Z _ P O S T _ P R O G R A M _ C O M M A N D
$( MOZ_POST_PROGRAM_COMMAND) $@
e n d i f
i f e q ( $( OS_ARCH ) , B e O S )
i f d e f B E O S _ P R O G R A M _ R E S O U R C E
xres -o $@ $( BEOS_PROGRAM_RESOURCE)
mimeset $@
e n d i f
e n d i f # BeOS
2009-01-22 19:49:22 +03:00
$(HOST_PROGRAM) : $( HOST_PROGOBJS ) $( HOST_LIBS_DEPS ) $( HOST_EXTRA_DEPS ) $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
i f e q ( W I N C E , $( OS_ARCH ) )
$( HOST_LD) -NOLOGO -OUT:$@ $( HOST_OBJS) $( WIN32_EXE_LDFLAGS) $( HOST_LIBS) $( HOST_EXTRA_LIBS)
e l s e
i f e q ( _ W I N N T , $( GNU_CC ) _ $( HOST_OS_ARCH ) )
2008-11-17 15:56:38 +03:00
$( HOST_LD) -NOLOGO -OUT:$@ -PDB:$( HOST_PDBFILE) $( HOST_OBJS) $( WIN32_EXE_LDFLAGS) $( HOST_LIBS) $( HOST_EXTRA_LIBS)
2008-07-22 16:27:55 +04:00
i f d e f M S M A N I F E S T _ T O O L
@if test -f $@ .manifest; then \
2010-02-24 11:16:08 +03:00
if test -f " $( srcdir) / $@ .manifest " ; then \
2010-04-14 11:28:01 +04:00
echo " Embedding manifest from $( srcdir) / $@ .manifest and $@ .manifest " ; \
2010-02-24 11:16:08 +03:00
mt.exe -NOLOGO -MANIFEST " $( win_srcdir) / $@ .manifest " $@ .manifest -OUTPUTRESOURCE:$@ \; 1; \
else \
2010-04-14 11:28:01 +04:00
echo " Embedding manifest from $@ .manifest " ; \
2010-02-24 11:16:08 +03:00
mt.exe -NOLOGO -MANIFEST $@ .manifest -OUTPUTRESOURCE:$@ \; 1; \
fi ; \
2010-04-14 11:28:01 +04:00
elif test -f " $( srcdir) / $@ .manifest " ; then \
echo " Embedding manifest from $( srcdir) / $@ .manifest " ; \
mt.exe -NOLOGO -MANIFEST " $( win_srcdir) / $@ .manifest " -OUTPUTRESOURCE:$@ \; 1; \
2008-07-22 16:27:55 +04:00
fi
e n d i f # MSVC with manifest tool
e l s e
2012-05-12 02:39:06 +04:00
i f e q ( $( HOST_CPP_PROG_LINK ) , 1 )
2008-07-22 16:27:55 +04:00
$( HOST_CXX) -o $@ $( HOST_CXXFLAGS) $( HOST_LDFLAGS) $( HOST_PROGOBJS) $( HOST_LIBS) $( HOST_EXTRA_LIBS)
e l s e
$( HOST_CC) -o $@ $( HOST_CFLAGS) $( HOST_LDFLAGS) $( HOST_PROGOBJS) $( HOST_LIBS) $( HOST_EXTRA_LIBS)
2012-05-12 02:39:06 +04:00
e n d i f # HOST_CPP_PROG_LINK
2008-07-22 16:27:55 +04:00
e n d i f
e n d i f
#
# This is an attempt to support generation of multiple binaries
# in one directory, it assumes everything to compile Foo is in
# Foo.o (from either Foo.c or Foo.cpp).
#
# SIMPLE_PROGRAMS = Foo Bar
# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
#
2009-01-22 19:49:22 +03:00
$(SIMPLE_PROGRAMS) : %$( BIN_SUFFIX ) : %.$( OBJ_SUFFIX ) $( LIBS_DEPS ) $( EXTRA_DEPS ) $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
i f e q ( W I N C E , $( OS_ARCH ) )
2011-12-27 22:18:29 +04:00
$( EXPAND_LD) -nologo -entry:mainACRTStartup -out:$@ $< $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( LIBS) $( EXTRA_LIBS) $( OS_LIBS)
2008-07-22 16:27:55 +04:00
e l s e
i f e q ( _ W I N N T , $( GNU_CC ) _ $( OS_ARCH ) )
2011-12-27 22:18:29 +04:00
$( EXPAND_LD) -nologo -out:$@ -pdb:$( LINK_PDBFILE) $< $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( LIBS) $( EXTRA_LIBS) $( OS_LIBS)
2008-07-22 16:27:55 +04:00
i f d e f M S M A N I F E S T _ T O O L
@if test -f $@ .manifest; then \
mt.exe -NOLOGO -MANIFEST $@ .manifest -OUTPUTRESOURCE:$@ \; 1; \
2012-02-29 14:40:46 +04:00
rm -f $@ .manifest; \
2008-07-22 16:27:55 +04:00
fi
e n d i f # MSVC with manifest tool
e l s e
2011-12-27 22:18:29 +04:00
$( EXPAND_CCC) $( CXXFLAGS) -o $@ $< $( WIN32_EXE_LDFLAGS) $( LDFLAGS) $( MOZ_GLUE_PROGRAM_LDFLAGS) $( WRAP_LDFLAGS) $( LIBS_DIR) $( LIBS) $( OS_LIBS) $( EXTRA_LIBS) $( BIN_FLAGS)
2008-07-22 16:27:55 +04:00
e n d i f # WINNT && !GNU_CC
e n d i f # WINCE
i f d e f E N A B L E _ S T R I P
$( STRIP) $@
e n d i f
i f d e f M O Z _ P O S T _ P R O G R A M _ C O M M A N D
$( MOZ_POST_PROGRAM_COMMAND) $@
e n d i f
2009-01-22 19:49:22 +03:00
$(HOST_SIMPLE_PROGRAMS) : host_ %$( HOST_BIN_SUFFIX ) : host_ %.$( OBJ_SUFFIX ) $( HOST_LIBS_DEPS ) $( HOST_EXTRA_DEPS ) $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
i f e q ( W I N C E , $( OS_ARCH ) )
$( HOST_LD) -NOLOGO -OUT:$@ $( WIN32_EXE_LDFLAGS) $< $( HOST_LIBS) $( HOST_EXTRA_LIBS)
e l s e
i f e q ( W I N N T _ , $( HOST_OS_ARCH ) _ $( GNU_CC ) )
2008-11-17 15:56:38 +03:00
$( HOST_LD) -NOLOGO -OUT:$@ -PDB:$( HOST_PDBFILE) $< $( WIN32_EXE_LDFLAGS) $( HOST_LIBS) $( HOST_EXTRA_LIBS)
2008-07-22 16:27:55 +04:00
e l s e
i f n e q ( , $( HOST_CPPSRCS ) $( USE_HOST_CXX ) )
$( HOST_CXX) $( HOST_OUTOPTION) $@ $( HOST_CXXFLAGS) $( INCLUDES) $< $( HOST_LIBS) $( HOST_EXTRA_LIBS)
e l s e
$( HOST_CC) $( HOST_OUTOPTION) $@ $( HOST_CFLAGS) $( INCLUDES) $< $( HOST_LIBS) $( HOST_EXTRA_LIBS)
e n d i f
e n d i f
e n d i f
i f d e f D T R A C E _ P R O B E _ O B J
EXTRA_DEPS += $( DTRACE_PROBE_OBJ)
e n d i f
2011-09-15 19:13:53 +04:00
$(filter %.$(LIB_SUFFIX),$(LIBRARY)) : $( OBJS ) $( LOBJS ) $( SHARED_LIBRARY_LIBS_DEPS ) $( EXTRA_DEPS ) $( GLOBAL_DEPS )
2012-02-29 14:40:46 +04:00
rm -f $( LIBRARY)
2011-09-15 19:13:53 +04:00
$( EXPAND_AR) $( AR_FLAGS) $( OBJS) $( LOBJS) $( SHARED_LIBRARY_LIBS)
2008-07-22 16:27:55 +04:00
$( RANLIB) $@
2011-09-15 19:13:53 +04:00
$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)) : $( filter %.$ ( LIB_SUFFIX ) ,$ ( LIBRARY ) ) $( OBJS ) $( LOBJS ) $( SHARED_LIBRARY_LIBS_DEPS ) $( EXTRA_DEPS ) $( GLOBAL_DEPS )
# When we only build a library descriptor, blow out any existing library
$( if $( filter %.$( LIB_SUFFIX) ,$( LIBRARY) ) ,,$( RM) $( REAL_LIBRARY) $( EXPORT_LIBRARY:%= %/$( REAL_LIBRARY) ) )
$( EXPAND_LIBS_GEN) $( OBJS) $( LOBJS) $( SHARED_LIBRARY_LIBS) > $@
2008-07-22 16:27:55 +04:00
i f e q ( , $( filter -out WINNT WINCE , $ ( OS_ARCH ) ) )
$(IMPORT_LIBRARY) : $( SHARED_LIBRARY )
e n d i f
i f e q ( $( OS_ARCH ) , O S 2 )
$(DEF_FILE) : $( OBJS ) $( SHARED_LIBRARY_LIBS )
2012-02-29 14:40:46 +04:00
rm -f $@
2010-03-27 08:23:08 +03:00
echo LIBRARY $( SHARED_LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
2008-07-22 16:27:55 +04:00
echo PROTMODE >> $@
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
echo EXPORTS >> $@
2010-09-02 07:08:00 +04:00
2008-07-22 16:27:55 +04:00
$( ADD_TO_DEF_FILE)
i f d e f M O Z _ O S 2 _ U S E _ D E C L S P E C
$(IMPORT_LIBRARY) : $( SHARED_LIBRARY )
e l s e
$(IMPORT_LIBRARY) : $( DEF_FILE )
e n d i f
2012-02-29 14:40:46 +04:00
rm -f $@
2008-07-22 16:27:55 +04:00
$( IMPLIB) $@ $^
$( RANLIB) $@
e n d i f # OS/2
$(HOST_LIBRARY) : $( HOST_OBJS ) Makefile
2012-02-29 14:40:46 +04:00
rm -f $@
2008-07-22 16:27:55 +04:00
$( HOST_AR) $( HOST_AR_FLAGS) $( HOST_OBJS)
$( HOST_RANLIB) $@
i f d e f H A V E _ D T R A C E
i f n d e f X P _ M A C O S X
i f d e f D T R A C E _ P R O B E _ O B J
i f n d e f D T R A C E _ L I B _ D E P E N D E N T
$(DTRACE_PROBE_OBJ) : $( OBJS )
2010-01-13 15:37:03 +03:00
dtrace -G -C -s $( MOZILLA_DTRACE_SRC) -o $( DTRACE_PROBE_OBJ) $( OBJS)
2008-07-22 16:27:55 +04:00
e n d i f
e n d i f
e n d i f
e n d i f
# On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
# so instead of deleting .o files after repacking them into a dylib, we make
# symlinks back to the originals. The symlinks are a no-op for stabs debugging,
# so no need to conditionalize on OS version or debugging format.
2011-09-15 19:13:53 +04:00
$(SHARED_LIBRARY) : $( OBJS ) $( LOBJS ) $( DEF_FILE ) $( RESFILE ) $( SHARED_LIBRARY_LIBS_DEPS ) $( LIBRARY ) $( EXTRA_DEPS ) $( DSO_LDOPTS_DEPS ) $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
i f n d e f I N C R E M E N T A L _ L I N K E R
2012-02-29 14:40:46 +04:00
rm -f $@
2008-07-22 16:27:55 +04:00
e n d i f
i f e q ( $( OS_ARCH ) , O p e n V M S )
@if test ! -f $( VMS_SYMVEC_FILE) ; then \
if test -f $( VMS_SYMVEC_FILE_MODULE) ; then \
echo Creating specific component options file $( VMS_SYMVEC_FILE) ; \
cp $( VMS_SYMVEC_FILE_MODULE) $( VMS_SYMVEC_FILE) ; \
fi ; \
fi
i f d e f I S _ C O M P O N E N T
@if test ! -f $( VMS_SYMVEC_FILE) ; then \
echo Creating generic component options file $( VMS_SYMVEC_FILE) ; \
cp $( VMS_SYMVEC_FILE_COMP) $( VMS_SYMVEC_FILE) ; \
fi
e n d i f
2008-08-30 01:59:02 +04:00
e n d i f # OpenVMS
2008-07-22 16:27:55 +04:00
i f d e f D T R A C E _ L I B _ D E P E N D E N T
i f n d e f X P _ M A C O S X
2011-09-15 19:13:53 +04:00
dtrace -G -C -s $( MOZILLA_DTRACE_SRC) -o $( DTRACE_PROBE_OBJ) $( shell $( EXPAND_LIBS) $( MOZILLA_PROBE_LIBS) )
e n d i f
2011-12-27 22:18:29 +04:00
$( EXPAND_MKSHLIB) $( SHLIB_LDSTARTFILE) $( OBJS) $( LOBJS) $( SUB_SHLOBJS) $( DTRACE_PROBE_OBJ) $( MOZILLA_PROBE_LIBS) $( RESFILE) $( LDFLAGS) $( MOZ_GLUE_LDFLAGS) $( WRAP_LDFLAGS) $( SHARED_LIBRARY_LIBS) $( EXTRA_DSO_LDOPTS) $( OS_LIBS) $( EXTRA_LIBS) $( DEF_FILE) $( SHLIB_LDENDFILE)
2008-08-30 01:59:02 +04:00
e l s e # ! DTRACE_LIB_DEPENDENT
2011-12-27 22:18:29 +04:00
$( EXPAND_MKSHLIB) $( SHLIB_LDSTARTFILE) $( OBJS) $( DTRACE_PROBE_OBJ) $( LOBJS) $( SUB_SHLOBJS) $( RESFILE) $( LDFLAGS) $( MOZ_GLUE_LDFLAGS) $( WRAP_LDFLAGS) $( SHARED_LIBRARY_LIBS) $( EXTRA_DSO_LDOPTS) $( OS_LIBS) $( EXTRA_LIBS) $( DEF_FILE) $( SHLIB_LDENDFILE)
2008-07-22 16:27:55 +04:00
e n d i f # DTRACE_LIB_DEPENDENT
i f e q ( _ W I N N T , $( GNU_CC ) _ $( OS_ARCH ) )
i f d e f M S M A N I F E S T _ T O O L
i f d e f E M B E D _ M A N I F E S T _ A T
@if test -f $@ .manifest; then \
mt.exe -NOLOGO -MANIFEST $@ .manifest -OUTPUTRESOURCE:$@ \; $( EMBED_MANIFEST_AT) ; \
2012-02-29 14:40:46 +04:00
rm -f $@ .manifest; \
2008-07-22 16:27:55 +04:00
fi
e n d i f # EMBED_MANIFEST_AT
e n d i f # MSVC with manifest tool
2010-03-04 15:43:51 +03:00
i f d e f M O Z _ P R O F I L E _ G E N E R A T E
touch -t ` date +%Y%m%d%H%M.%S -d "now+5seconds" ` pgo.relink
e n d i f
2008-07-22 16:27:55 +04:00
e n d i f # WINNT && !GCC
2012-02-29 14:40:46 +04:00
@rm -f foodummyfilefoo $( DELETE_AFTER_LINK)
2008-07-22 16:27:55 +04:00
chmod +x $@
i f d e f E N A B L E _ S T R I P
$( STRIP) $@
e n d i f
i f d e f M O Z _ P O S T _ D S O _ L I B _ C O M M A N D
$( MOZ_POST_DSO_LIB_COMMAND) $@
e n d i f
i f d e f M O Z _ A U T O _ D E P S
i f d e f C O M P I L E R _ D E P E N D
2009-08-04 19:13:06 +04:00
i f e q ( $( SOLARIS_SUNPRO_CC ) , 1 )
2008-07-22 16:27:55 +04:00
_MDDEPFILE = $( MDDEPDIR) /$( @F) .pp
d e f i n e M A K E _ D E P S _ A U T O _ C C
i f t e s t - d $( @D ) ; t h e n \
echo " Building deps for $< using Sun Studio cc " ; \
$( CC) $( COMPILE_CFLAGS) -xM $< >$( _MDDEPFILE) ; \
f i
e n d e f
d e f i n e M A K E _ D E P S _ A U T O _ C X X
i f t e s t - d $( @D ) ; t h e n \
echo " Building deps for $< using Sun Studio CC " ; \
$( CXX) $( COMPILE_CXXFLAGS) -xM $< >$( _MDDEPFILE) ; \
f i
e n d e f
e n d i f # Sun Studio on Solaris
e l s e # COMPILER_DEPEND
#
# Generate dependencies on the fly
#
_MDDEPFILE = $( MDDEPDIR) /$( @F) .pp
d e f i n e M A K E _ D E P S _ A U T O
i f t e s t - d $( @D ) ; t h e n \
echo " Building deps for $< " ; \
2010-08-10 08:16:32 +04:00
$( MKDEPEND) -o'.$(OBJ_SUFFIX)' -f- $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) $( INCLUDES) $< 2>/dev/null | sed -e "s|^[^ ]*/||" > $( _MDDEPFILE) ; \
2008-07-22 16:27:55 +04:00
f i
e n d e f
MAKE_DEPS_AUTO_CC = $( MAKE_DEPS_AUTO)
MAKE_DEPS_AUTO_CXX = $( MAKE_DEPS_AUTO)
e n d i f # COMPILER_DEPEND
e n d i f # MOZ_AUTO_DEPS
# Rules for building native targets must come first because of the host_ prefix
2009-01-22 19:49:22 +03:00
host_%.$(OBJ_SUFFIX) : %.c $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
$( ELOG) $( HOST_CC) $( HOST_OUTOPTION) $@ -c $( HOST_CFLAGS) $( INCLUDES) $( NSPR_CFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
host_%.$(OBJ_SUFFIX) : %.cpp $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
$( ELOG) $( HOST_CXX) $( HOST_OUTOPTION) $@ -c $( HOST_CXXFLAGS) $( INCLUDES) $( NSPR_CFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
host_%.$(OBJ_SUFFIX) : %.cc $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
$( ELOG) $( HOST_CXX) $( HOST_OUTOPTION) $@ -c $( HOST_CXXFLAGS) $( INCLUDES) $( NSPR_CFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
host_%.$(OBJ_SUFFIX) : %.m $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
$( ELOG) $( HOST_CC) $( HOST_OUTOPTION) $@ -c $( HOST_CFLAGS) $( HOST_CMFLAGS) $( INCLUDES) $( NSPR_CFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
host_%.$(OBJ_SUFFIX) : %.mm $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
$( ELOG) $( HOST_CXX) $( HOST_OUTOPTION) $@ -c $( HOST_CXXFLAGS) $( HOST_CMMFLAGS) $( INCLUDES) $( NSPR_CFLAGS) $( _VPATH_SRCS)
2010-03-31 18:11:32 +04:00
% :: %.c $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CC)
$( ELOG) $( CC) $( CFLAGS) $( LDFLAGS) $( OUTOPTION) $@ $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
%.$(OBJ_SUFFIX) : %.c $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CC)
$( ELOG) $( CC) $( OUTOPTION) $@ -c $( COMPILE_CFLAGS) $( _VPATH_SRCS)
i f d e f A S F I L E S
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.
2009-01-22 19:49:22 +03:00
%.$(OBJ_SUFFIX) : %.$( ASM_SUFFIX ) $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( AS) -o $@ $( ASFLAGS) $( AS_DASH_C_FLAG) $( _VPATH_SRCS)
e n d i f
2009-01-22 19:49:22 +03:00
%.$(OBJ_SUFFIX) : %.S $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( AS) -o $@ $( ASFLAGS) -c $<
2010-03-31 18:11:32 +04:00
% :: %.cpp $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
@$( MAKE_DEPS_AUTO_CXX)
$( CCC) $( OUTOPTION) $@ $( CXXFLAGS) $( _VPATH_SRCS) $( LDFLAGS)
#
# Please keep the next two rules in sync.
#
2009-01-22 19:49:22 +03:00
%.$(OBJ_SUFFIX) : %.cc $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CXX)
$( ELOG) $( CCC) $( OUTOPTION) $@ -c $( COMPILE_CXXFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
%.$(OBJ_SUFFIX) : %.cpp $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CXX)
i f d e f S T R I C T _ C P L U S P L U S _ S U F F I X
echo " #line 1 \" $* .cpp\" " | cat - $* .cpp > t_$* .cc
$( ELOG) $( CCC) -o $@ -c $( COMPILE_CXXFLAGS) t_$* .cc
2012-02-29 14:40:46 +04:00
rm -f t_$* .cc
2008-07-22 16:27:55 +04:00
e l s e
$( ELOG) $( CCC) $( OUTOPTION) $@ -c $( COMPILE_CXXFLAGS) $( _VPATH_SRCS)
e n d i f #STRICT_CPLUSPLUS_SUFFIX
2009-01-22 19:49:22 +03:00
$(OBJ_PREFIX)%.$(OBJ_SUFFIX) : %.mm $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CXX)
$( ELOG) $( CCC) -o $@ -c $( COMPILE_CXXFLAGS) $( COMPILE_CMMFLAGS) $( _VPATH_SRCS)
2009-01-22 19:49:22 +03:00
$(OBJ_PREFIX)%.$(OBJ_SUFFIX) : %.m $( GLOBAL_DEPS )
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
@$( MAKE_DEPS_AUTO_CC)
$( ELOG) $( CC) -o $@ -c $( COMPILE_CFLAGS) $( COMPILE_CMFLAGS) $( _VPATH_SRCS)
%.s : %.cpp
$( CCC) -S $( COMPILE_CXXFLAGS) $( _VPATH_SRCS)
%.s : %.cc
$( CCC) -S $( COMPILE_CXXFLAGS) $( _VPATH_SRCS)
%.s : %.c
$( CC) -S $( COMPILE_CFLAGS) $( _VPATH_SRCS)
%.i : %.cpp
$( CCC) -C -E $( COMPILE_CXXFLAGS) $( _VPATH_SRCS) > $* .i
%.i : %.cc
$( CCC) -C -E $( COMPILE_CXXFLAGS) $( _VPATH_SRCS) > $* .i
%.i : %.c
$( CC) -C -E $( COMPILE_CFLAGS) $( _VPATH_SRCS) > $* .i
%.i : %.mm
$( CCC) -C -E $( COMPILE_CXXFLAGS) $( COMPILE_CMMFLAGS) $( _VPATH_SRCS) > $* .i
%.res : %.rc
@echo Creating Resource file: $@
i f e q ( $( OS_ARCH ) , O S 2 )
$( RC) $( RCFLAGS:-D%= -d %) -i $( subst /,\, $( srcdir) ) -r $< $@
e l s e
i f d e f G N U _ C C
$( RC) $( RCFLAGS) $( filter-out -U%,$( DEFINES) ) $( INCLUDES:-I%= --include-dir %) $( OUTOPTION) $@ $( _VPATH_SRCS)
e l s e
$( RC) $( RCFLAGS) -r $( DEFINES) $( INCLUDES) $( OUTOPTION) $@ $( _VPATH_SRCS)
e n d i f
e n d i f
# need 3 separate lines for OS/2
2010-03-31 18:11:32 +04:00
% :: %.pl
2012-02-29 14:40:46 +04:00
rm -f $@
2008-07-22 16:27:55 +04:00
cp $< $@
chmod +x $@
2010-03-31 18:11:32 +04:00
% :: %.sh
2012-02-29 14:40:46 +04:00
rm -f $@ ; cp $< $@ ; chmod +x $@
2008-07-22 16:27:55 +04:00
# Cancel these implicit rules
#
% : %, v
% : RCS /%, v
% : s .%
% : SCCS /s .%
2010-04-09 18:07:45 +04:00
# Cygwin and MSYS have their own special path form, but javac expects the source
# and class paths to be in the DOS form (i.e. e:/builds/...). This function
# does the appropriate conversion on Windows, but is a noop on other systems.
i f e q ( , $( filter -out WINNT WINCE , $ ( HOST_OS_ARCH ) ) )
i f d e f C Y G W I N _ W R A P P E R
normalizepath = $( foreach p,$( 1) ,$( shell cygpath -m $( p) ) )
e l s e
# assume MSYS
# We use 'pwd -W' to get DOS form of the path. However, since the given path
# could be a file or a non-existent path, we cannot call 'pwd -W' directly
# on the path. Instead, we extract the root path (i.e. "c:/"), call 'pwd -W'
# on it, then merge with the rest of the path.
root-path = $( shell echo $( 1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\1|" )
non-root-path = $( shell echo $( 1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\2|" )
normalizepath = $( foreach p,$( 1) ,$( if $( filter /%,$( 1) ) ,$( patsubst %/,%,$( shell cd $( call root-path,$( 1) ) && pwd -W) ) /$( call non-root-path,$( 1) ) ,$( 1) ) )
e n d i f
e l s e
normalizepath = $( 1)
e n d i f
2008-07-22 16:27:55 +04:00
###############################################################################
# Update Makefiles
###############################################################################
# In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
# processing them with AS perl. See bug 232003
i f d e f A S _ P E R L
CYGWIN_TOPSRCDIR = -nowrap -p $( topsrcdir) -wrap
e n d i f
# Note: Passing depth to make-makefile is optional.
# It saves the script some work, though.
Makefile : Makefile .in
@$( PERL) $( AUTOCONF_TOOLS) /make-makefile -t $( topsrcdir) -d $( DEPTH) $( CYGWIN_TOPSRCDIR)
i f d e f S U B M A K E F I L E S
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES) : % : $( srcdir ) /%.in
$( PERL) $( AUTOCONF_TOOLS) /make-makefile -t $( topsrcdir) -d $( DEPTH) $( CYGWIN_TOPSRCDIR) $@
e n d i f
i f d e f A U T O U P D A T E _ C O N F I G U R E
$(topsrcdir)/configure : $( topsrcdir ) /configure .in
( cd $( topsrcdir) && $( AUTOCONF) ) && ( cd $( DEPTH) && ./config.status --recheck)
e n d i f
###############################################################################
# Bunch of things that extend the 'export' rule (in order):
###############################################################################
################################################################################
2010-04-02 18:46:27 +04:00
# Copy each element of EXPORTS to $(DIST)/include
2008-07-22 16:27:55 +04:00
i f n e q ( $( XPI_NAME ) , )
2008-11-05 17:46:40 +03:00
$(FINAL_TARGET) :
$( NSINSTALL) -D $@
export :: $( FINAL_TARGET )
2008-07-22 16:27:55 +04:00
e n d i f
i f n d e f N O _ D I S T _ I N S T A L L
2010-04-02 18:46:27 +04:00
i f n e q ( , $( EXPORTS ) )
export :: $( EXPORTS )
$( INSTALL) $( IFLAGS1) $^ $( DIST) /include
e n d i f
e n d i f # NO_DIST_INSTALL
2008-07-22 16:27:55 +04:00
2010-04-02 18:46:27 +04:00
d e f i n e E X P O R T _ N A M E S P A C E _ R U L E
i f n d e f N O _ D I S T _ I N S T A L L
export :: $( EXPORTS_ $ ( namespace ) )
$( INSTALL) $( IFLAGS1) $$ ^ $( DIST) /include/$( namespace)
2008-07-22 16:27:55 +04:00
e n d i f # NO_DIST_INSTALL
2010-04-02 18:46:27 +04:00
e n d e f
$( foreach namespace ,$ ( EXPORTS_NAMESPACES ) ,$ ( eval $ ( EXPORT_NAMESPACE_RULE ) ) )
2008-07-22 16:27:55 +04:00
################################################################################
# Copy each element of PREF_JS_EXPORTS
i f d e f G R E _ M O D U L E
PREF_DIR = greprefs
e l s e
i f n e q ( , $( XPI_NAME ) $( LIBXUL_SDK ) )
PREF_DIR = defaults/preferences
e l s e
PREF_DIR = defaults/pref
e n d i f
e n d i f
i f n e q ( $( PREF_JS_EXPORTS ) , )
# on win32, pref files need CRLF line endings... see bug 206029
i f e q ( W I N N T , $( OS_ARCH ) )
PREF_PPFLAGS = --line-endings= crlf
e n d i f
i f n d e f N O _ D I S T _ I N S T A L L
2008-11-05 17:46:40 +03:00
$(FINAL_TARGET)/$(PREF_DIR) :
$( NSINSTALL) -D $@
libs :: $( FINAL_TARGET ) /$( PREF_DIR ) $( PREF_JS_EXPORTS )
2008-07-22 16:27:55 +04:00
$( EXIT_ON_ERROR) \
for i in $( PREF_JS_EXPORTS) ; do \
dest = $( FINAL_TARGET) /$( PREF_DIR) /` basename $$ i` ; \
$( RM) -f $$ dest; \
$( PYTHON) $( MOZILLA_SRCDIR) /config/Preprocessor.py $( PREF_PPFLAGS) $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) $$ i > $$ dest; \
done
e n d i f
e n d i f
################################################################################
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
i f n e q ( $( AUTOCFG_JS_EXPORTS ) , )
$(FINAL_TARGET)/defaults/autoconfig ::
2008-11-05 17:46:40 +03:00
$( NSINSTALL) -D $@
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
export :: $( AUTOCFG_JS_EXPORTS ) $( FINAL_TARGET ) /defaults /autoconfig
$( INSTALL) $( IFLAGS1) $^
e n d i f
e n d i f
################################################################################
2010-04-02 18:46:27 +04:00
# Export the elements of $(XPIDLSRCS)
2008-07-22 16:27:55 +04:00
# generating .h and .xpt files and moving them to the appropriate places.
2010-04-02 18:46:27 +04:00
i f n e q ( $( XPIDLSRCS ) , )
2008-07-22 16:27:55 +04:00
export :: $( patsubst %.idl ,$ ( XPIDL_GEN_DIR ) /%.h , $ ( XPIDLSRCS ) )
i f n d e f X P I D L _ M O D U L E
XPIDL_MODULE = $( MODULE)
e n d i f
i f e q ( $( XPIDL_MODULE ) , ) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
export :: FORCE
@echo
@echo "*** Error processing XPIDLSRCS:"
@echo "Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
@echo "so we have a module name to use when creating MODULE.xpt."
@echo; sleep 2; false
e n d i f
2010-04-02 18:46:27 +04:00
$(IDL_DIR) ::
2008-11-05 17:46:40 +03:00
$( NSINSTALL) -D $@
2008-07-22 16:27:55 +04:00
2010-04-02 18:46:27 +04:00
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(DIST)/include;
2008-07-22 16:27:55 +04:00
# warn against overriding existing .h file.
$(XPIDL_GEN_DIR)/.done :
2012-02-29 14:40:46 +04:00
@if test ! -d $( XPIDL_GEN_DIR) ; then echo Creating $( XPIDL_GEN_DIR) /.done; rm -rf $( XPIDL_GEN_DIR) ; mkdir $( XPIDL_GEN_DIR) ; fi
@touch $@
2008-07-22 16:27:55 +04:00
# don't depend on $(XPIDL_GEN_DIR), because the modification date changes
# with any addition to the directory, regenerating all .h files -> everything.
2011-08-24 21:01:45 +04:00
XPIDL_DEPS = \
2012-05-14 20:02:04 +04:00
$( LIBXUL_DIST) /sdk/bin/header.py \
$( LIBXUL_DIST) /sdk/bin/typelib.py \
$( LIBXUL_DIST) /sdk/bin/xpidl.py \
2011-08-24 21:01:45 +04:00
$( NULL)
$(XPIDL_GEN_DIR)/%.h : %.idl $( XPIDL_DEPS ) $( XPIDL_GEN_DIR ) /.done
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
2011-08-24 21:01:45 +04:00
$( PYTHON) -u $( MOZILLA_DIR) /config/pythonpath.py \
-I$( MOZILLA_DIR) /other-licenses/ply \
2012-05-14 20:02:04 +04:00
$( LIBXUL_DIST) /sdk/bin/header.py $( XPIDL_FLAGS) $( _VPATH_SRCS) -d $( MDDEPDIR) /$( @F) .pp -o $@
2010-04-02 18:46:27 +04:00
@if test -n " $( findstring $* .h, $( EXPORTS) ) " ; \
2008-07-22 16:27:55 +04:00
then echo " *** WARNING: file $* .h generated from $* .idl overrides $( srcdir) / $* .h " ; else true; fi
i f n d e f N O _ G E N _ X P T
# generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
# into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
2011-08-24 21:01:45 +04:00
$(XPIDL_GEN_DIR)/%.xpt : %.idl $( XPIDL_DEPS ) $( XPIDL_GEN_DIR ) /.done
2008-07-22 16:27:55 +04:00
$( REPORT_BUILD)
2011-08-24 21:01:45 +04:00
$( PYTHON) -u $( MOZILLA_DIR) /config/pythonpath.py \
-I$( MOZILLA_DIR) /other-licenses/ply \
-I$( MOZILLA_DIR) /xpcom/typelib/xpt/tools \
2012-05-14 20:02:04 +04:00
$( LIBXUL_DIST) /sdk/bin/typelib.py $( XPIDL_FLAGS) $( _VPATH_SRCS) -d $( MDDEPDIR) /$( @F) .pp -o $@
2008-07-22 16:27:55 +04:00
# no need to link together if XPIDLSRCS contains only XPIDL_MODULE
i f n e q ( $( XPIDL_MODULE ) . i d l , $( strip $ ( XPIDLSRCS ) ) )
2011-04-15 12:27:19 +04:00
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt : $( patsubst %.idl ,$ ( XPIDL_GEN_DIR ) /%.xpt ,$ ( XPIDLSRCS ) ) $( GLOBAL_DEPS )
$( XPIDL_LINK) $( XPIDL_GEN_DIR) /$( XPIDL_MODULE) .xpt $( patsubst %.idl,$( XPIDL_GEN_DIR) /%.xpt,$( XPIDLSRCS) )
2008-07-22 16:27:55 +04:00
e n d i f # XPIDL_MODULE.xpt != XPIDLSRCS
libs :: $( XPIDL_GEN_DIR ) /$( XPIDL_MODULE ) .xpt
i f n d e f N O _ D I S T _ I N S T A L L
$( INSTALL) $( IFLAGS1) $( XPIDL_GEN_DIR) /$( XPIDL_MODULE) .xpt $( FINAL_TARGET) /components
2010-07-04 16:37:13 +04:00
i f n d e f N O _ I N T E R F A C E S _ M A N I F E S T
@$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_TARGET) /components/interfaces.manifest " interfaces $( XPIDL_MODULE) .xpt "
2010-08-09 21:12:17 +04:00
@$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_TARGET) /chrome.manifest "manifest components/interfaces.manifest"
2010-07-04 16:37:13 +04:00
e n d i f
2008-07-22 16:27:55 +04:00
e n d i f
e n d i f # NO_GEN_XPT
GARBAGE_DIRS += $( XPIDL_GEN_DIR)
2010-04-02 18:46:27 +04:00
e n d i f # XPIDLSRCS
2008-07-22 16:27:55 +04:00
i f n e q ( $( XPIDLSRCS ) , )
# export .idl files to $(IDL_DIR)
i f n d e f N O _ D I S T _ I N S T A L L
export :: $( XPIDLSRCS ) $( IDL_DIR )
$( INSTALL) $( IFLAGS1) $^
2010-04-02 18:46:27 +04:00
export :: $( patsubst %.idl ,$ ( XPIDL_GEN_DIR ) /%.h , $ ( XPIDLSRCS ) ) $( DIST ) /include
2008-07-22 16:27:55 +04:00
$( INSTALL) $( IFLAGS1) $^
e n d i f # NO_DIST_INSTALL
e n d i f # XPIDLSRCS
#
# General rules for exporting idl files.
#
# WORK-AROUND ONLY, for mozilla/tools/module-deps/bootstrap.pl build.
# Bug to fix idl dependency problems w/o this extra build pass is
# http://bugzilla.mozilla.org/show_bug.cgi?id=145777
#
$(IDL_DIR) ::
2008-11-05 17:46:40 +03:00
$( NSINSTALL) -D $@
2008-07-22 16:27:55 +04:00
export-idl :: $( SUBMAKEFILES ) $( MAKE_DIRS )
2010-04-02 18:46:27 +04:00
i f n e q ( $( XPIDLSRCS ) , )
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
2010-04-02 18:46:27 +04:00
export-idl :: $( XPIDLSRCS ) $( IDL_DIR )
2008-07-22 16:27:55 +04:00
$( INSTALL) $( IFLAGS1) $^
e n d i f
e n d i f
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
################################################################################
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
2010-07-04 16:37:13 +04:00
i f n e q ( , $( filter %.js ,$ ( EXTRA_COMPONENTS ) $ ( EXTRA_PP_COMPONENTS ) ) )
i f e q ( , $( filter %.manifest ,$ ( EXTRA_COMPONENTS ) $ ( EXTRA_PP_COMPONENTS ) ) )
i f n d e f N O _ J S _ M A N I F E S T
2010-10-22 13:51:44 +04:00
$(error .js component without matching .manifest. See https : //developer .mozilla .org /en /XPCOM /XPCOM_changes_in_Gecko_ 2.0)
2010-07-04 16:37:13 +04:00
e n d i f
e n d i f
e n d i f
2008-07-22 16:27:55 +04:00
i f d e f E X T R A _ C O M P O N E N T S
libs :: $( EXTRA_COMPONENTS )
i f n d e f N O _ D I S T _ I N S T A L L
$( INSTALL) $( IFLAGS1) $^ $( FINAL_TARGET) /components
e n d i f
e n d i f
i f d e f E X T R A _ P P _ C O M P O N E N T S
libs :: $( EXTRA_PP_COMPONENTS )
i f n d e f N O _ D I S T _ I N S T A L L
2009-12-14 17:09:58 +03:00
$( EXIT_ON_ERROR) \
$( NSINSTALL) -D $( FINAL_TARGET) /components; \
for i in $^; do \
2010-08-10 08:16:32 +04:00
fname = ` basename $$ i` ; \
2009-12-14 17:09:58 +03:00
dest = $( FINAL_TARGET) /components/$$ { fname} ; \
$( RM) -f $$ dest; \
$( PYTHON) $( MOZILLA_SRCDIR) /config/Preprocessor.py $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) $$ i > $$ dest; \
done
e n d i f
2010-08-09 21:12:17 +04:00
e n d i f
2008-07-22 16:27:55 +04:00
2010-08-09 21:12:17 +04:00
EXTRA_MANIFESTS = $( filter %.manifest,$( EXTRA_COMPONENTS) $( EXTRA_PP_COMPONENTS) )
i f n e q ( , $( EXTRA_MANIFESTS ) )
libs ::
$( PYTHON) $( MOZILLA_DIR) /config/buildlist.py $( FINAL_TARGET) /chrome.manifest $( patsubst %,"manifest components/%" ,$( notdir $( EXTRA_MANIFESTS) ) )
2008-07-22 16:27:55 +04:00
e n d i f
################################################################################
# Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules
i f d e f E X T R A _ J S _ M O D U L E S
libs :: $( EXTRA_JS_MODULES )
i f n d e f N O _ D I S T _ I N S T A L L
$( INSTALL) $( IFLAGS1) $^ $( FINAL_TARGET) /modules
e n d i f
e n d i f
i f d e f E X T R A _ P P _ J S _ M O D U L E S
libs :: $( EXTRA_PP_JS_MODULES )
i f n d e f N O _ D I S T _ I N S T A L L
$( EXIT_ON_ERROR) \
$( NSINSTALL) -D $( FINAL_TARGET) /modules; \
for i in $^; do \
dest = $( FINAL_TARGET) /modules/` basename $$ i` ; \
$( RM) -f $$ dest; \
$( PYTHON) $( MOZILLA_SRCDIR) /config/Preprocessor.py $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) $$ i > $$ dest; \
done
e n d i f
e n d i f
################################################################################
# SDK
i f n e q ( , $( SDK_LIBRARY ) )
$(SDK_LIB_DIR) ::
2008-11-05 17:46:40 +03:00
$( NSINSTALL) -D $@
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
libs :: $( SDK_LIBRARY ) $( SDK_LIB_DIR )
$( INSTALL) $( IFLAGS2) $^
e n d i f
e n d i f # SDK_LIBRARY
i f n e q ( , $( SDK_BINARY ) )
$(SDK_BIN_DIR) ::
2008-11-05 17:46:40 +03:00
$( NSINSTALL) -D $@
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
libs :: $( SDK_BINARY ) $( SDK_BIN_DIR )
$( INSTALL) $( IFLAGS2) $^
e n d i f
e n d i f # SDK_BINARY
################################################################################
# CHROME PACKAGING
JAR_MANIFEST := $( srcdir) /jar.mn
chrome ::
$( MAKE) realchrome
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
2008-11-05 17:46:40 +03:00
$(FINAL_TARGET)/chrome :
$( NSINSTALL) -D $@
2010-07-25 18:43:41 +04:00
libs realchrome :: $( CHROME_DEPS ) $( FINAL_TARGET ) /chrome
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
i f n e q ( , $( wildcard $ ( JAR_MANIFEST ) ) )
2008-07-22 16:27:55 +04:00
i f n d e f N O _ D I S T _ I N S T A L L
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
$( PYTHON) $( MOZILLA_DIR) /config/JarMaker.py \
$( QUIET) -j $( FINAL_TARGET) /chrome \
$( MAKE_JARS_FLAGS) $( XULPPFLAGS) $( DEFINES) $( ACDEFINES) \
$( JAR_MANIFEST)
e n d i f
2008-07-22 16:27:55 +04:00
e n d i f
i f n e q ( $( DIST_FILES ) , )
2010-02-11 04:15:39 +03:00
$(DIST)/bin :
$( NSINSTALL) -D $@
libs :: $( DIST_FILES ) $( DIST ) /bin
2008-07-22 16:27:55 +04:00
@$( EXIT_ON_ERROR) \
for f in $( DIST_FILES) ; do \
dest = $( FINAL_TARGET) /` basename $$ f` ; \
$( RM) -f $$ dest; \
$( PYTHON) $( MOZILLA_DIR) /config/Preprocessor.py \
$( XULAPP_DEFINES) $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) \
$( srcdir) /$$ f > $$ dest; \
done
e n d i f
i f n e q ( $( DIST_CHROME_FILES ) , )
libs :: $( DIST_CHROME_FILES )
@$( EXIT_ON_ERROR) \
for f in $( DIST_CHROME_FILES) ; do \
dest = $( FINAL_TARGET) /chrome/` basename $$ f` ; \
$( RM) -f $$ dest; \
$( PYTHON) $( MOZILLA_DIR) /config/Preprocessor.py \
$( XULAPP_DEFINES) $( DEFINES) $( ACDEFINES) $( XULPPFLAGS) \
$( srcdir) /$$ f > $$ dest; \
done
e n d i f
i f n e q ( $( XPI_PKGNAME ) , )
libs realchrome ::
i f d e f S T R I P _ X P I
i f n d e f M O Z _ D E B U G
@echo " Stripping $( XPI_PKGNAME) package directory... "
@echo $( FINAL_TARGET)
@cd $( FINAL_TARGET) && find . ! -type d \
! -name "*.js" \
! -name "*.xpt" \
! -name "*.gif" \
! -name "*.jpg" \
! -name "*.png" \
! -name "*.xpm" \
! -name "*.txt" \
! -name "*.rdf" \
! -name "*.sh" \
! -name "*.properties" \
! -name "*.dtd" \
! -name "*.html" \
! -name "*.xul" \
! -name "*.css" \
! -name "*.xml" \
! -name "*.jar" \
! -name "*.dat" \
! -name "*.tbl" \
! -name "*.src" \
! -name "*.reg" \
$( PLATFORM_EXCLUDE_LIST) \
-exec $( STRIP) $( STRIP_FLAGS) { } >/dev/null 2>& 1 \;
e n d i f
e n d i f
@echo " Packaging $( XPI_PKGNAME) .xpi... "
cd $( FINAL_TARGET) && $( ZIP) -qr ../$( XPI_PKGNAME) .xpi *
e n d i f
i f d e f I N S T A L L _ E X T E N S I O N _ I D
i f n d e f X P I _ N A M E
$( error XPI_NAME must be set for INSTALL_EXTENSION_ID )
e n d i f
libs ::
$( RM) -rf " $( DIST) /bin/extensions/ $( INSTALL_EXTENSION_ID) "
$( NSINSTALL) -D " $( DIST) /bin/extensions/ $( INSTALL_EXTENSION_ID) "
cd $( FINAL_TARGET) && tar $( TAR_CREATE_FLAGS) - . | ( cd " ../../bin/extensions/ $( INSTALL_EXTENSION_ID) " && tar -xf -)
e n d i f
i f n e q ( , $( filter flat symlink ,$ ( MOZ_CHROME_FILE_FORMAT ) ) )
_JAR_REGCHROME_DISABLE_JAR = 1
e l s e
_JAR_REGCHROME_DISABLE_JAR = 0
e n d i f
REGCHROME = $( PERL) -I$( MOZILLA_DIR) /config $( MOZILLA_DIR) /config/add-chrome.pl \
$( if $( filter gtk2,$( MOZ_WIDGET_TOOLKIT) ) ,-x) \
$( if $( CROSS_COMPILE) ,-o $( OS_ARCH) ) $( FINAL_TARGET) /chrome/installed-chrome.txt \
$( _JAR_REGCHROME_DISABLE_JAR)
REGCHROME_INSTALL = $( PERL) -I$( MOZILLA_DIR) /config $( MOZILLA_DIR) /config/add-chrome.pl \
$( if $( filter gtk2,$( MOZ_WIDGET_TOOLKIT) ) ,-x) \
$( if $( CROSS_COMPILE) ,-o $( OS_ARCH) ) $( DESTDIR) $( mozappdir) /chrome/installed-chrome.txt \
$( _JAR_REGCHROME_DISABLE_JAR)
#############################################################################
# Dependency system
#############################################################################
i f d e f C O M P I L E R _ D E P E N D
depend ::
@echo " $( MAKE) : No need to run depend target.\
Using compiler-based depend." 1>&2
i f e q ( $( GNU_CC ) $( GNU_CXX ) , )
# Non-GNU compilers
@echo " `echo ' $( MAKE) :'|sed 's/./ /g'` " \
'(Compiler-based depend was turned on by "--enable-md".)' 1>& 2
e l s e
# GNU compilers
@space= " `echo ' $( MAKE) : '|sed 's/./ /g'` " ; \
echo " $$ space " ' Since you are using a GNU compiler,\
it is on by default.' 1>& 2; \
echo " $$ space " 'To turn it off, pass --disable-md to configure.' 1>& 2
e n d i f
e l s e # ! COMPILER_DEPEND
i f n d e f M O Z _ A U T O _ D E P S
d e f i n e M A K E _ D E P S _ N O A U T O
$( MKDEPEND) -w1024 -o'.$(OBJ_SUFFIX)' -f- $( DEFINES) $( ACDEFINES) $( INCLUDES) $< 2>/dev/null | sed -e "s|^[^ ]*/||" > $@
e n d e f
$(MDDEPDIR)/%.pp : %.c
$( REPORT_BUILD)
@$( MAKE_DEPS_NOAUTO)
$(MDDEPDIR)/%.pp : %.cpp
$( REPORT_BUILD)
@$( MAKE_DEPS_NOAUTO)
$(MDDEPDIR)/%.pp : %.s
$( REPORT_BUILD)
@$( MAKE_DEPS_NOAUTO)
2010-04-02 18:46:27 +04:00
i f n e q ( , $( OBJS ) $( XPIDLSRCS ) $( SIMPLE_PROGRAMS ) )
2008-07-22 16:27:55 +04:00
depend :: $( SUBMAKEFILES ) $( MAKE_DIRS ) $( MDDEPFILES )
e l s e
depend :: $( SUBMAKEFILES )
e n d i f
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
dependclean :: $( SUBMAKEFILES )
2012-02-29 14:40:46 +04:00
rm -f $( MDDEPFILES)
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2008-07-22 16:27:55 +04:00
e n d i f # MOZ_AUTO_DEPS
e n d i f # COMPILER_DEPEND
#############################################################################
# MDDEPDIR is the subdirectory where all the dependency files are placed.
# This uses a make rule (instead of a macro) to support parallel
# builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
# processes could simultaneously try to create the same directory.
#
2008-12-04 17:46:34 +03:00
# We use $(CURDIR) in the rule's target to ensure that we don't find
# a dependency directory in the source tree via VPATH (perhaps from
# a previous build in the source tree) and thus neglect to create a
# dependency directory in the object directory, where we really need
# it.
$(CURDIR)/$(MDDEPDIR) :
2012-02-29 14:40:46 +04:00
@if test ! -d $@ ; then echo Creating $@ ; rm -rf $@ ; mkdir $@ ; else true; fi
2008-07-22 16:27:55 +04:00
i f n e q ( , $( filter -out all chrome default export realchrome tools clean clobber clobber_all distclean realclean ,$ ( MAKECMDGOALS ) ) )
2010-04-02 18:46:27 +04:00
i f n e q ( , $( OBJS ) $( XPIDLSRCS ) $( SIMPLE_PROGRAMS ) )
2008-07-22 16:27:55 +04:00
MDDEPEND_FILES := $( strip $( wildcard $( MDDEPDIR) /*.pp) )
i f n e q ( , $( MDDEPEND_FILES ) )
2010-08-10 08:16:32 +04:00
# The script mddepend.pl checks the dependencies and writes to stdout
# one rule to force out-of-date objects. For example,
# foo.o boo.o: FORCE
# The script has an advantage over including the *.pp files directly
# because it handles the case when header files are removed from the build.
# 'make' would complain that there is no way to build missing headers.
2010-03-06 12:57:41 +03:00
ALL_PP_RESULTS = $( shell $( PERL) $( BUILD_TOOLS) /mddepend.pl - $( MDDEPEND_FILES) )
$( eval $ ( ALL_PP_RESULTS ) )
2008-07-22 16:27:55 +04:00
e n d i f
e n d i f
e n d i f
#############################################################################
- i n c l u d e $( topsrcdir ) / $( MOZ_BUILD_APP ) / a p p - r u l e s . m k
- i n c l u d e $( MY_RULES )
#
# Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
# or in $(MY_RULES)
#
i f d e f E T A G S
i f n e q ( $( CSRCS ) $( CPPSRCS ) $( HEADERS ) , )
all :: TAGS
TAGS :: $( CSRCS ) $( CPPSRCS ) $( HEADERS )
$( ETAGS) $( CSRCS) $( CPPSRCS) $( HEADERS)
e n d i f
e n d i f
################################################################################
# Special gmake rules.
################################################################################
#
# Disallow parallel builds with MSVC < 8
#
i f n e q ( , $( filter 1200 1300 1310,$ ( _MSC_VER ) ) )
.NOTPARALLEL :
e n d i f
#
# Re-define the list of default suffixes, so gmake won't have to churn through
# hundreds of built-in suffix rules for stuff we don't need.
#
.SUFFIXES :
#
# Fake targets. Always run these rules, even if a file/directory with that
# name already exists.
#
2010-03-31 18:11:32 +04:00
.PHONY : all alltags boot checkout chrome realchrome clean clobber clobber_all export install libs makefiles realclean run_apprunner tools $( DIRS ) $( TOOL_DIRS ) FORCE
2008-07-22 16:27:55 +04:00
# Used as a dependency to force targets to rebuild
FORCE :
# Delete target if error occurs when building target
.DELETE_ON_ERROR :
# Properly set LIBPATTERNS for the platform
.LIBPATTERNS = $( if $( IMPORT_LIB_SUFFIX) ,$( LIB_PREFIX) %.$( IMPORT_LIB_SUFFIX) ) $( LIB_PREFIX) %.$( LIB_SUFFIX) $( DLL_PREFIX) %$( DLL_SUFFIX)
tags : TAGS
TAGS : $( SUBMAKEFILES ) $( CSRCS ) $( CPPSRCS ) $( wildcard *.h )
-etags $( CSRCS) $( CPPSRCS) $( wildcard *.h)
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
2008-07-22 16:27:55 +04:00
echo-variable-% :
bug 475111 - port bug 471685, bug 469558, bug 464190, bug 467579, bug 397227, bug 463420, bug 466492, bug 471188, bug 467271, bug 466486 to comm-central, r=Standard8
2009-01-29 23:09:08 +03:00
@echo " $( $* ) "
2008-07-22 16:27:55 +04:00
echo-tiers :
@echo $( TIERS)
2010-08-10 08:16:32 +04:00
echo-tier-dirs :
@$( foreach tier,$( TIERS) ,echo '$(tier):' ; echo ' dirs: $(tier_$(tier)_dirs)' ; echo ' staticdirs: $(tier_$(tier)_staticdirs)' ; )
2008-07-22 16:27:55 +04:00
echo-dirs :
@echo $( DIRS)
echo-module :
@echo $( MODULE)
echo-requires :
@echo $( REQUIRES)
echo-depth-path :
@$( MOZILLA_SRCDIR) /build/unix/print-depth-path.sh
echo-module-name :
@$( MOZILLA_SRCDIR) /build/package/rpm/print-module-name.sh
echo-module-filelist :
@$( MOZILLA_SRCDIR) /build/package/rpm/print-module-filelist.sh
showtargs :
i f n e q ( , $( filter $ ( PROGRAM ) $ ( HOST_PROGRAM ) $ ( SIMPLE_PROGRAMS ) $ ( HOST_LIBRARY ) $ ( LIBRARY ) $ ( SHARED_LIBRARY ) ,$ ( TARGETS ) ) )
@echo --------------------------------------------------------------------------------
@echo " PROGRAM = $( PROGRAM) "
@echo " SIMPLE_PROGRAMS = $( SIMPLE_PROGRAMS) "
@echo " LIBRARY = $( LIBRARY) "
@echo " SHARED_LIBRARY = $( SHARED_LIBRARY) "
@echo " SHARED_LIBRARY_LIBS = $( SHARED_LIBRARY_LIBS) "
@echo " LIBS = $( LIBS) "
@echo " DEF_FILE = $( DEF_FILE) "
@echo " IMPORT_LIBRARY = $( IMPORT_LIBRARY) "
@echo " STATIC_LIBS = $( STATIC_LIBS) "
@echo " SHARED_LIBS = $( SHARED_LIBS) "
@echo " EXTRA_DSO_LIBS = $( EXTRA_DSO_LIBS) "
@echo " EXTRA_DSO_LDOPTS = $( EXTRA_DSO_LDOPTS) "
@echo " DEPENDENT_LIBS = $( DEPENDENT_LIBS) "
@echo --------------------------------------------------------------------------------
e n d i f
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
2008-07-22 16:27:55 +04:00
showbuild :
@echo " MOZ_BUILD_ROOT = $( MOZ_BUILD_ROOT) "
@echo " MOZ_WIDGET_TOOLKIT = $( MOZ_WIDGET_TOOLKIT) "
@echo " CC = $( CC) "
@echo " CXX = $( CXX) "
@echo " CCC = $( CCC) "
@echo " CPP = $( CPP) "
@echo " LD = $( LD) "
@echo " AR = $( AR) "
@echo " IMPLIB = $( IMPLIB) "
@echo " FILTER = $( FILTER) "
@echo " MKSHLIB = $( MKSHLIB) "
@echo " MKCSHLIB = $( MKCSHLIB) "
@echo " RC = $( RC) "
@echo " CFLAGS = $( CFLAGS) "
@echo " OS_CFLAGS = $( OS_CFLAGS) "
@echo " COMPILE_CFLAGS = $( COMPILE_CFLAGS) "
@echo " CXXFLAGS = $( CXXFLAGS) "
@echo " OS_CXXFLAGS = $( OS_CXXFLAGS) "
@echo " COMPILE_CXXFLAGS = $( COMPILE_CXXFLAGS) "
@echo " COMPILE_CMFLAGS = $( COMPILE_CMFLAGS) "
@echo " COMPILE_CMMFLAGS = $( COMPILE_CMMFLAGS) "
@echo " LDFLAGS = $( LDFLAGS) "
@echo " OS_LDFLAGS = $( OS_LDFLAGS) "
@echo " DSO_LDOPTS = $( DSO_LDOPTS) "
@echo " OS_INCLUDES = $( OS_INCLUDES) "
@echo " OS_LIBS = $( OS_LIBS) "
@echo " EXTRA_LIBS = $( EXTRA_LIBS) "
@echo " BIN_FLAGS = $( BIN_FLAGS) "
@echo " INCLUDES = $( INCLUDES) "
@echo " DEFINES = $( DEFINES) "
@echo " ACDEFINES = $( ACDEFINES) "
@echo " BIN_SUFFIX = $( BIN_SUFFIX) "
@echo " LIB_SUFFIX = $( LIB_SUFFIX) "
@echo " DLL_SUFFIX = $( DLL_SUFFIX) "
@echo " IMPORT_LIB_SUFFIX = $( IMPORT_LIB_SUFFIX) "
@echo " INSTALL = $( INSTALL) "
showhost :
@echo " HOST_CC = $( HOST_CC) "
@echo " HOST_CXX = $( HOST_CXX) "
@echo " HOST_CFLAGS = $( HOST_CFLAGS) "
@echo " HOST_LDFLAGS = $( HOST_LDFLAGS) "
@echo " HOST_LIBS = $( HOST_LIBS) "
@echo " HOST_EXTRA_LIBS = $( HOST_EXTRA_LIBS) "
@echo " HOST_EXTRA_DEPS = $( HOST_EXTRA_DEPS) "
@echo " HOST_PROGRAM = $( HOST_PROGRAM) "
@echo " HOST_OBJS = $( HOST_OBJS) "
@echo " HOST_PROGOBJS = $( HOST_PROGOBJS) "
@echo " HOST_LIBRARY = $( HOST_LIBRARY) "
showbuildmods ::
@echo " Build Modules = $( BUILD_MODULES) "
@echo " Module dirs = $( BUILD_MODULE_DIRS) "
documentation :
@cd $( DEPTH)
$( DOXYGEN) $( DEPTH) /config/doxygen.cfg
2009-05-04 03:06:15 +04:00
i f d e f E N A B L E _ T E S T S
2008-07-22 16:27:55 +04:00
check :: $( SUBMAKEFILES ) $( MAKE_DIRS )
2010-03-31 18:11:32 +04:00
$( LOOP_OVER_PARALLEL_DIRS)
$( LOOP_OVER_DIRS)
$( LOOP_OVER_TOOL_DIRS)
2009-05-04 03:06:15 +04:00
e n d i f
2010-04-02 18:46:27 +04:00
FREEZE_VARIABLES = \
CSRCS \
CPPSRCS \
EXPORTS \
XPIDLSRCS \
DIRS \
LIBRARY \
MODULE \
REQUIRES \
SHORT_LIBNAME \
TIERS \
2010-08-09 21:12:17 +04:00
EXTRA_COMPONENTS \
EXTRA_PP_COMPONENTS \
2010-04-02 18:46:27 +04:00
$( NULL)
$(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN : = '$( $ ( var ) ) '))
CHECK_FROZEN_VARIABLES = $( foreach var,$( FREEZE_VARIABLES) , \
$( if $( subst $( $( var) _FROZEN) ,,'$($(var))' ) ,$( error Makefile variable '$(var)' changed value after including rules.mk. Was $( $( var) _FROZEN) , now $( $( var) ) .) ) )
libs export libs ::
$( CHECK_FROZEN_VARIABLES)
2010-08-10 08:16:32 +04:00
2010-10-22 13:51:44 +04:00
default all ::
2012-02-29 14:40:46 +04:00
if test -d $( DIST) /bin ; then touch $( DIST) /bin/.purgecaches ; fi