~ubuntu-branches/ubuntu/trusty/enigmail/trusty-updates

« back to all changes in this revision

Viewing changes to config/config.mk

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-06-07 14:35:53 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: package-import@ubuntu.com-20110607143553-fbgqhhvh8g8h6j1y
Tags: 2:1.2~a2~cvs20110606t2200-0ubuntu1
* Update to latest trunk snapshot for Thunderbird beta compat

* Remove build/pgo/profileserver.py from debian/clean. The new build
  system has a target depending on this
  - update debian/clean
* Drop debian/patches/autoconf.diff, just generate this at build time
* Refresh debian/patches/build_system_dont_link_libxul.diff
* libipc seems to be renamed to libipc-pipe. Fix genxpi and chrome.manifest
  to fix this 
  - add debian/patches/ipc-pipe_rename.diff
  - update debian/patches/series
* The makefiles in extensions/enigmail/ipc have an incorrect DEPTH
  attribute. Fix this so that they can find the rest of the build system
  - add debian/patches/makefile_depth.diff
  - update debian/patches/series
* Drop debian/patches/makefile-in-empty-xpcom-fix.diff - fixed in the
  current version
* Don't register a class ID multiple times, as this breaks enigmail entirely
  - add debian/patches/dont_register_cids_multiple_times.diff
  - update debian/patches/series
* Look for the Thunderbird 5 SDK
  - update debian/rules
  - update debian/control
* Run autoconf2.13 at build time
  - update debian/rules
  - update debian/control
* Add useless mesa-common-dev build-dep, just to satisfy the build system.
  We should just patch this out entirely really, but that's for another upload
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#
46
46
 
47
47
# Define an include-at-most-once flag
 
48
#ifdef INCLUDED_CONFIG_MK
 
49
#$(error Don't include config.mk twice!)
 
50
#endif
48
51
INCLUDED_CONFIG_MK = 1
49
52
 
50
53
EXIT_ON_ERROR = set -e; # Shell loops continue past errors without this.
56
59
ifndef INCLUDED_AUTOCONF_MK
57
60
include $(DEPTH)/config/autoconf.mk
58
61
endif
59
 
ifndef INCLUDED_INSURE_MK
60
 
ifdef MOZ_INSURIFYING
61
 
include $(topsrcdir)/config/insure.mk
62
 
endif
63
 
endif
64
62
 
65
63
COMMA = ,
66
64
 
85
83
 
86
84
core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
87
85
 
 
86
nullstr :=
 
87
space :=$(nullstr) # EOL
 
88
 
 
89
core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))
 
90
 
88
91
# FINAL_TARGET specifies the location into which we copy end-user-shipped
89
92
# build products (typelibs, components, chrome).
90
93
#
92
95
# XPI-contents staging directory for ambitious and right-thinking extensions.
93
96
FINAL_TARGET = $(if $(XPI_NAME),$(DIST)/xpi-stage/$(XPI_NAME),$(DIST)/bin)
94
97
 
95
 
# MAKE_JARS_TARGET is a staging area for make-jars.pl.  When packaging in
96
 
# the jar format, make-jars leaves behind a directory structure that's not
97
 
# needed in $(FINAL_TARGET).  For both, flat, and symlink, the directory
98
 
# structure contains the chrome, so leave it in $(FINAL_TARGET).
99
 
ifeq (jar,$(MOZ_CHROME_FILE_FORMAT))
100
 
MAKE_JARS_TARGET = $(if $(XPI_NAME),$(FINAL_TARGET).stage,$(DIST)/chrome-stage)
101
 
else
102
 
MAKE_JARS_TARGET = $(FINAL_TARGET)
 
98
ifdef XPI_NAME
 
99
DEFINES += -DXPI_NAME=$(XPI_NAME)
103
100
endif
104
101
 
105
102
# The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
123
120
LD              := $(CC)
124
121
endif
125
122
endif
126
 
ifeq ($(OS_ARCH),BeOS)
127
 
BEOS_ADDON_WORKAROUND   = 1
128
 
endif
129
123
 
130
124
#
131
125
# Strip off the excessively long version numbers on these platforms,
154
148
 
155
149
ifdef MOZ_MEMORY
156
150
ifneq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
157
 
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) $(MKSHLIB_UNFORCE_ALL)
158
 
endif
159
 
endif
 
151
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
 
152
# If we are linking jemalloc into a program, we want the jemalloc symbols
 
153
# to be exported
 
154
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
 
155
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
 
156
endif
 
157
endif
 
158
endif
 
159
 
 
160
CC := $(CC_WRAPPER) $(CC)
 
161
CXX := $(CXX_WRAPPER) $(CXX)
 
162
MKDIR ?= mkdir
 
163
SLEEP ?= sleep
 
164
TOUCH ?= touch
160
165
 
161
166
# determine debug-related options
162
167
_DEBUG_CFLAGS :=
163
168
_DEBUG_LDFLAGS :=
164
169
 
165
 
ifndef MOZ_DEBUG
166
 
  # global debugging is disabled 
167
 
  # check if it was explicitly enabled for this module
168
 
  ifneq (, $(findstring $(MODULE), $(MOZ_DEBUG_MODULES)))
169
 
    MOZ_DEBUG:=1
170
 
  endif
171
 
else
172
 
  # global debugging is enabled
173
 
  # check if it was explicitly disabled for this module
174
 
  ifneq (, $(findstring ^$(MODULE), $(MOZ_DEBUG_MODULES)))
175
 
    MOZ_DEBUG:=
176
 
  endif
177
 
endif
178
 
 
179
170
ifdef MOZ_DEBUG
180
 
  _DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
 
171
  _DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
 
172
  _DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
181
173
  XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
182
174
else
183
175
  _DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
184
176
  XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
185
 
endif
186
 
 
187
 
# determine if -g should be passed to the compiler, based on
188
 
# the current module, and the value of MOZ_DBGRINFO_MODULES
189
 
 
190
 
ifdef MOZ_DEBUG
191
 
  MOZ_DBGRINFO_MODULES += ALL_MODULES
192
 
  pattern := ALL_MODULES ^ALL_MODULES
193
 
else
194
 
  MOZ_DBGRINFO_MODULES += ^ALL_MODULES
195
 
  pattern := ALL_MODULES ^ALL_MODULES
196
 
endif
197
 
 
198
 
ifdef MODULE
199
 
  # our current Makefile specifies a module name - add it to our pattern
200
 
  pattern += $(MODULE) ^$(MODULE)
201
 
endif
202
 
 
203
 
# start by finding the first relevant module name 
204
 
# (remember that the order of the module names in MOZ_DBGRINFO_MODULES 
205
 
# is reversed from the order the user specified to configure - 
206
 
# this allows the user to put general names at the beginning
207
 
# of the list, and to override them with explicit module names later 
208
 
# in the list)
209
 
 
210
 
first_match:=$(firstword $(filter $(pattern), $(MOZ_DBGRINFO_MODULES)))
211
 
 
212
 
ifeq ($(first_match), $(MODULE))
213
 
  # the user specified explicitly that 
214
 
  # this module should be compiled with -g
215
 
  _DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
216
 
  _DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
217
 
else
218
 
  ifeq ($(first_match), ^$(MODULE))
219
 
    # the user specified explicitly that this module 
220
 
    # should not be compiled with -g (nothing to do)
221
 
  else
222
 
    ifeq ($(first_match), ALL_MODULES)
223
 
      # the user didn't mention this module explicitly, 
224
 
      # but wanted all modules to be compiled with -g
225
 
      _DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
226
 
      _DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)      
227
 
    else
228
 
      ifeq ($(first_match), ^ALL_MODULES)
229
 
        # the user didn't mention this module explicitly, 
230
 
        # but wanted all modules to be compiled without -g (nothing to do)
231
 
      endif
232
 
    endif
 
177
  ifdef MOZ_DEBUG_SYMBOLS
 
178
    _DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
 
179
    _DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
233
180
  endif
234
181
endif
235
182
 
 
183
MOZALLOC_LIB = $(call EXPAND_LIBNAME_PATH,mozalloc,$(DIST)/lib)
236
184
 
237
 
# append debug flags 
238
 
# (these might have been above when processing MOZ_DBGRINFO_MODULES)
239
185
OS_CFLAGS += $(_DEBUG_CFLAGS)
240
186
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
241
187
OS_LDFLAGS += $(_DEBUG_LDFLAGS)
263
209
ifdef MOZ_DEBUG_SYMBOLS
264
210
OS_CXXFLAGS += -Zi -UDEBUG -DNDEBUG
265
211
OS_CFLAGS += -Zi -UDEBUG -DNDEBUG
266
 
OS_LDFLAGS += -DEBUG -OPT:REF -OPT:nowin98
 
212
ifdef HAVE_64BIT_OS
 
213
OS_LDFLAGS += -DEBUG -OPT:REF,ICF
 
214
else
 
215
OS_LDFLAGS += -DEBUG -OPT:REF
 
216
endif
267
217
endif
268
218
 
269
219
ifdef MOZ_QUANTIFY
283
233
#
284
234
ifdef NS_TRACE_MALLOC
285
235
MOZ_OPTIMIZE_FLAGS=-Zi -Od -UDEBUG -DNDEBUG
286
 
OS_LDFLAGS = -DEBUG -PDB:NONE -OPT:REF -OPT:nowin98
 
236
ifdef HAVE_64BIT_OS
 
237
OS_LDFLAGS = -DEBUG -PDB:NONE -OPT:REF,ICF
 
238
else
 
239
OS_LDFLAGS = -DEBUG -PDB:NONE -OPT:REF
 
240
endif
287
241
endif # NS_TRACE_MALLOC
288
242
 
289
243
endif # MOZ_DEBUG
301
255
_ENABLE_PIC=1
302
256
endif
303
257
 
304
 
# In Firefox, all components are linked into either libxul or the static
305
 
# meta-component, and should be compiled with PIC.
306
 
ifdef MOZ_META_COMPONENT
307
 
_ENABLE_PIC=1
308
 
endif
309
 
 
310
258
# If module is going to be merged into the nsStaticModule, 
311
259
# make sure that the entry points are translated and 
312
260
# the module is built static.
383
331
NO_PROFILE_GUIDED_OPTIMIZE = 1
384
332
endif
385
333
 
 
334
# No sense in profiling tools
 
335
ifdef INTERNAL_TOOLS
 
336
NO_PROFILE_GUIDED_OPTIMIZE = 1
 
337
endif
 
338
 
 
339
# Don't build SIMPLE_PROGRAMS with PGO, since they don't need it anyway,
 
340
# and we don't have the same build logic to re-link them in the second pass.
 
341
ifdef SIMPLE_PROGRAMS
 
342
NO_PROFILE_GUIDED_OPTIMIZE = 1
 
343
endif
 
344
 
386
345
# Enable profile-based feedback
387
346
ifndef NO_PROFILE_GUIDED_OPTIMIZE
388
347
ifdef MOZ_PROFILE_GENERATE
389
 
# No sense in profiling tools
390
 
ifndef INTERNAL_TOOLS
391
348
OS_CFLAGS += $(PROFILE_GEN_CFLAGS)
392
349
OS_CXXFLAGS += $(PROFILE_GEN_CFLAGS)
393
350
OS_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
394
351
ifeq (WINNT,$(OS_ARCH))
395
352
AR_FLAGS += -LTCG
396
353
endif
397
 
endif # INTERNAL_TOOLS
398
354
endif # MOZ_PROFILE_GENERATE
399
355
 
400
356
ifdef MOZ_PROFILE_USE
401
 
ifndef INTERNAL_TOOLS
402
357
OS_CFLAGS += $(PROFILE_USE_CFLAGS)
403
358
OS_CXXFLAGS += $(PROFILE_USE_CFLAGS)
404
359
OS_LDFLAGS += $(PROFILE_USE_LDFLAGS)
405
360
ifeq (WINNT,$(OS_ARCH))
406
361
AR_FLAGS += -LTCG
407
362
endif
408
 
endif # INTERNAL_TOOLS
409
363
endif # MOZ_PROFILE_USE
410
364
endif # NO_PROFILE_GUIDED_OPTIMIZE
411
365
 
423
377
                -D_IMPL_NS_COM \
424
378
                -DEXPORT_XPT_API \
425
379
                -DEXPORT_XPTC_API \
426
 
                -D_IMPL_NS_COM_OBSOLETE \
427
380
                -D_IMPL_NS_GFX \
428
381
                -D_IMPL_NS_WIDGET \
429
382
                -DIMPL_XREAPI \
431
384
                -DIMPL_THEBES \
432
385
                $(NULL)
433
386
 
434
 
ifndef MOZ_NATIVE_ZLIB
435
 
DEFINES += -DZLIB_INTERNAL
 
387
ifndef JS_SHARED_LIBRARY
 
388
DEFINES += -DSTATIC_EXPORTABLE_JS_API
436
389
endif
437
390
endif
438
391
endif
450
403
endif
451
404
endif
452
405
 
453
 
# Flags passed to make-jars.pl
454
 
 
 
406
# Flags passed to JarMaker.py
455
407
MAKE_JARS_FLAGS = \
456
408
        -t $(topsrcdir) \
457
409
        -f $(MOZ_CHROME_FILE_FORMAT) \
484
436
#
485
437
# Default command macros; can be overridden in <arch>.mk.
486
438
#
487
 
CCC             = $(CXX)
488
 
NFSPWD          = $(CONFIG_TOOLS)/nfspwd
489
 
PURIFY          = purify $(PURIFYOPTIONS)
490
 
QUANTIFY        = quantify $(QUANTIFYOPTIONS)
 
439
CCC = $(CXX)
 
440
NFSPWD = $(CONFIG_TOOLS)/nfspwd
 
441
PURIFY = purify $(PURIFYOPTIONS)
 
442
QUANTIFY = quantify $(QUANTIFYOPTIONS)
491
443
ifdef CROSS_COMPILE
492
 
XPIDL_COMPILE   = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/host/bin/host_xpidl$(HOST_BIN_SUFFIX)
493
 
XPIDL_LINK      = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/host/bin/host_xpt_link$(HOST_BIN_SUFFIX)
 
444
XPIDL_COMPILE = $(LIBXUL_DIST)/host/bin/host_xpidl$(HOST_BIN_SUFFIX)
 
445
XPIDL_LINK = $(LIBXUL_DIST)/host/bin/host_xpt_link$(HOST_BIN_SUFFIX)
494
446
else
495
 
XPIDL_COMPILE   = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/bin/xpidl$(BIN_SUFFIX)
496
 
XPIDL_LINK      = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/bin/xpt_link$(BIN_SUFFIX)
 
447
XPIDL_COMPILE = $(LIBXUL_DIST)/bin/xpidl$(BIN_SUFFIX)
 
448
XPIDL_LINK = $(LIBXUL_DIST)/bin/xpt_link$(BIN_SUFFIX)
497
449
endif
498
450
 
499
451
# Java macros
512
464
 
513
465
include $(topsrcdir)/config/static-checking-config.mk
514
466
 
515
 
ifdef MOZ_SHARK
516
 
OS_CFLAGS += -F/System/Library/PrivateFrameworks
517
 
OS_CXXFLAGS += -F/System/Library/PrivateFrameworks
518
 
OS_LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
519
 
endif # ifdef MOZ_SHARK
520
 
 
521
467
CFLAGS          = $(OS_CFLAGS)
522
468
CXXFLAGS        = $(OS_CXXFLAGS)
523
469
LDFLAGS         = $(OS_LDFLAGS) $(MOZ_FIX_LINK_PATHS)
557
503
endif # MOZ_OPTIMIZE
558
504
endif # CROSS_COMPILE
559
505
 
 
506
# Check for FAIL_ON_WARNINGS & FAIL_ON_WARNINGS_DEBUG (Shorthand for Makefiles
 
507
# to request that we use the 'warnings as errors' compile flags)
 
508
 
 
509
# NOTE: First, we clear FAIL_ON_WARNINGS[_DEBUG] if we're doing a Windows PGO
 
510
# build, since WARNINGS_AS_ERRORS has been suspected of causing isuses in that
 
511
# situation. (See bug 437002.)
 
512
ifeq (WINNT_1,$(OS_ARCH)_$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
 
513
FAIL_ON_WARNINGS_DEBUG=
 
514
FAIL_ON_WARNINGS=
 
515
endif # WINNT && (MOS_PROFILE_GENERATE ^ MOZ_PROFILE_USE)
 
516
 
 
517
# Also clear FAIL_ON_WARNINGS[_DEBUG] for Android builds, since
 
518
# they have some platform-specific warnings we haven't fixed yet.
 
519
ifeq ($(OS_TARGET),Android)
 
520
FAIL_ON_WARNINGS_DEBUG=
 
521
FAIL_ON_WARNINGS=
 
522
endif # Android
 
523
 
 
524
# Now, check for debug version of flag; it turns on normal flag in debug builds.
 
525
ifdef FAIL_ON_WARNINGS_DEBUG
 
526
ifdef MOZ_DEBUG
 
527
FAIL_ON_WARNINGS = 1
 
528
endif # MOZ_DEBUG
 
529
endif # FAIL_ON_WARNINGS_DEBUG
 
530
 
 
531
# Check for normal version of flag, and add WARNINGS_AS_ERRORS if it's set to 1.
 
532
ifdef FAIL_ON_WARNINGS
 
533
CXXFLAGS += $(WARNINGS_AS_ERRORS)
 
534
CFLAGS   += $(WARNINGS_AS_ERRORS)
 
535
endif # FAIL_ON_WARNINGS
560
536
 
561
537
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
562
538
#// Currently, unless USE_STATIC_LIBS is defined, the multithreaded
590
566
OS_COMPILE_CMMFLAGS += -fobjc-exceptions
591
567
endif
592
568
 
593
 
COMPILE_CFLAGS  = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS)
594
 
COMPILE_CXXFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS)  $(CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS)
 
569
COMPILE_CFLAGS  = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS)
 
570
COMPILE_CXXFLAGS = $(STL_FLAGS) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS)
595
571
COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS)
596
572
COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS)
597
573
 
632
608
 
633
609
MOZ_COMPONENT_LIBS=$(XPCOM_LIBS) $(MOZ_COMPONENT_NSPR_LIBS)
634
610
 
635
 
ifdef GC_LEAK_DETECTOR
636
 
XPCOM_LIBS += -lboehm
637
 
endif
638
 
 
639
611
ifeq (xpconnect, $(findstring xpconnect, $(BUILD_MODULES)))
640
612
DEFINES +=  -DXPCONNECT_STANDALONE
641
613
endif
646
618
ELF_DYNSTR_GC   = :
647
619
endif
648
620
 
 
621
ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
 
622
OS_LIBS += $(MOZ_QT_LIBS)
 
623
endif
 
624
 
649
625
ifndef CROSS_COMPILE
650
626
ifdef USE_ELF_DYNSTR_GC
651
627
ifdef MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
686
662
 
687
663
 
688
664
ifdef MOZ_NATIVE_MAKEDEPEND
689
 
MKDEPEND_DIR    =
690
 
MKDEPEND        = $(CYGWIN_WRAPPER) $(MOZ_NATIVE_MAKEDEPEND)
 
665
MKDEPEND_DIR =
 
666
MKDEPEND = $(MOZ_NATIVE_MAKEDEPEND)
691
667
else
692
 
MKDEPEND_DIR    = $(CONFIG_TOOLS)/mkdepend
693
 
MKDEPEND        = $(CYGWIN_WRAPPER) $(MKDEPEND_DIR)/mkdepend$(BIN_SUFFIX)
 
668
MKDEPEND_DIR = $(CONFIG_TOOLS)/mkdepend
 
669
MKDEPEND = $(MKDEPEND_DIR)/mkdepend$(BIN_SUFFIX)
694
670
endif
695
671
 
696
672
# Set link flags according to whether we want a console.
720
696
endif
721
697
endif
722
698
 
723
 
# Flags needed to link against the component library
724
 
ifdef MOZ_COMPONENTLIB
725
 
MOZ_COMPONENTLIB_EXTRA_DSO_LIBS = mozcomps xpcom_compat
726
 
 
727
 
# Tell the linker where NSS is, if we're building crypto
728
 
ifeq ($(OS_ARCH),Darwin)
729
 
ifeq (,$(findstring crypto,$(MOZ_META_COMPONENTS)))
730
 
MOZ_COMPONENTLIB_EXTRA_LIBS = $(foreach library, $(patsubst -l%, $(LIB_PREFIX)%$(DLL_SUFFIX), $(filter -l%, $(NSS_LIBS))), -dylib_file @executable_path/$(library):$(DIST)/bin/$(library))
731
 
endif
732
 
endif
733
 
endif
734
 
 
735
699
# If we're building a component on MSVC, we don't want to generate an
736
700
# import lib, because that import lib will collide with the name of a
737
701
# static version of the same library.
754
718
DEFINES         += -DOSTYPE=\"$(OS_CONFIG)\"
755
719
DEFINES         += -DOSARCH=$(OS_ARCH)
756
720
 
757
 
# For profiling
758
 
ifdef ENABLE_EAZEL_PROFILER
759
 
ifndef INTERNAL_TOOLS
760
 
ifneq ($(LIBRARY_NAME), xpt)
761
 
ifneq (, $(findstring $(shell $(topsrcdir)/build/unix/print-depth-path.sh | awk -F/ '{ print $$2; }'), $(MOZ_PROFILE_MODULES)))
762
 
PROFILER_CFLAGS = $(EAZEL_PROFILER_CFLAGS) -DENABLE_EAZEL_PROFILER
763
 
PROFILER_LIBS   = $(EAZEL_PROFILER_LIBS)
764
 
endif
765
 
endif
766
 
endif
767
 
endif
768
 
 
769
721
######################################################################
770
722
 
771
723
GARBAGE         += $(DEPENDENCIES) $(MKDEPENDENCIES) $(MKDEPENDENCIES).bak core $(wildcard core.[0-9]*) $(wildcard *.err) $(wildcard *.pure) $(wildcard *_pure_*.o) Templates.DB
778
730
endif
779
731
 
780
732
ifdef NSINSTALL_BIN
781
 
NSINSTALL       = $(CYGWIN_WRAPPER) $(NSINSTALL_BIN)
 
733
NSINSTALL = $(NSINSTALL_BIN)
782
734
else
783
735
ifeq (OS2,$(CROSS_COMPILE)$(OS_ARCH))
784
 
NSINSTALL       = $(MOZ_TOOLS_DIR)/nsinstall
 
736
NSINSTALL = $(MOZ_TOOLS_DIR)/nsinstall
785
737
else
786
 
NSINSTALL       = $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX)
 
738
NSINSTALL = $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX)
787
739
endif # OS2
788
740
endif # NSINSTALL_BIN
789
741
 
812
764
# Use nsinstall in copy mode to install files on the system
813
765
SYSINSTALL      = $(NSINSTALL) -t
814
766
 
815
 
ifeq ($(OS_ARCH),WINNT)
816
 
ifneq (,$(CYGDRIVE_MOUNT))
817
 
export CYGDRIVE_MOUNT
818
 
endif
819
 
endif
820
 
 
821
767
#
822
768
# Localization build automation
823
769
#
849
795
endif
850
796
endif
851
797
 
852
 
ifeq (,$(filter WINCE WINNT OS2,$(OS_ARCH)))
 
798
ifdef LOCALE_MERGEDIR
 
799
MERGE_FILE = $(firstword \
 
800
  $(wildcard $(LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))/$(1)) \
 
801
  $(wildcard $(LOCALE_SRCDIR)/$(1)) \
 
802
  $(srcdir)/en-US/$(1) )
 
803
else
 
804
MERGE_FILE = $(LOCALE_SRCDIR)/$(1)
 
805
endif
 
806
MERGE_FILES = $(foreach f,$(1),$(call MERGE_FILE,$(f)))
 
807
 
 
808
ifdef WINCE
 
809
RUN_TEST_PROGRAM = $(PYTHON) $(topsrcdir)/build/mobile/devicemanager-run-test.py
 
810
else
 
811
ifeq (OS2,$(OS_ARCH))
 
812
RUN_TEST_PROGRAM = $(topsrcdir)/build/os2/test_os2.cmd "$(DIST)"
 
813
else
 
814
ifneq (WINNT,$(OS_ARCH))
853
815
RUN_TEST_PROGRAM = $(DIST)/bin/run-mozilla.sh
854
 
endif
855
 
 
856
 
ifeq ($(OS_ARCH),OS2)
857
 
RUN_TEST_PROGRAM = $(topsrcdir)/build/os2/test_os2.cmd "$(DIST)"
858
 
endif
 
816
endif # ! WINNT
 
817
endif # ! OS2
 
818
endif # ! WINCE
859
819
 
860
820
#
861
821
# Java macros
872
832
DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
873
833
STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
874
834
endif
 
835
 
 
836
OPTIMIZE_JARS_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/optimizejars.py)
 
837
 
 
838
CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/createprecomplete.py)
 
839
 
 
840
EXPAND_LIBS = $(PYTHON) -I$(DEPTH)/config $(topsrcdir)/config/expandlibs.py
 
841
EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_exec.py
 
842
EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_gen.py
 
843
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
 
844
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
 
845
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
 
846
EXPAND_LD = $(EXPAND_LIBS_EXEC) --uselist -- $(LD)
 
847
EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) --uselist -- $(MKSHLIB)