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

« back to all changes in this revision

Viewing changes to config/rules.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:
76
76
endif
77
77
 
78
78
# ELOG prints out failed command when building silently (gmake -s).
79
 
ifneq (,$(findstring -s,$(MAKEFLAGS)))
 
79
ifneq (,$(findstring s, $(filter-out --%, $(MAKEFLAGS))))
80
80
  ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
81
81
else
82
82
  ELOG :=
83
83
endif
84
84
 
85
85
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
86
 
ifndef GNU_CC
87
 
_LIBNAME_RELATIVE_PATHS=1
88
 
endif
89
 
endif
90
 
 
91
 
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
92
 
_VPATH_SRCS = $(if $(filter /%,$<),$<,$(CURDIR)/$<)
 
86
_VPATH_SRCS = $(abspath $<)
93
87
else
94
88
_VPATH_SRCS = $<
95
89
endif
111
105
# expands to $(DIST)/lib/foo.lib on platforms with import libs and
112
106
# -lfoo otherwise
113
107
 
114
 
ifdef _LIBNAME_RELATIVE_PATHS
115
108
EXPAND_LIBNAME = $(foreach lib,$(1),$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
116
109
EXPAND_LIBNAME_PATH = $(foreach lib,$(1),$(2)/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
117
110
EXPAND_MOZLIBNAME = $(foreach lib,$(1),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
118
 
else
119
 
EXPAND_LIBNAME = $(addprefix -l,$(1))
120
 
EXPAND_LIBNAME_PATH = -L$(2) $(addprefix -l,$(1))
121
 
EXPAND_MOZLIBNAME = $(addprefix -l,$(1))
122
 
endif
123
111
 
124
112
ifdef EXTRA_DSO_LIBS
125
113
EXTRA_DSO_LIBS  := $(call EXPAND_MOZLIBNAME,$(EXTRA_DSO_LIBS))
129
117
# Testing frameworks support
130
118
################################################################################
131
119
 
 
120
testxpcobjdir = $(DEPTH)/_tests/xpcshell
 
121
 
132
122
ifdef ENABLE_TESTS
133
123
 
134
124
ifdef XPCSHELL_TESTS
135
 
ifndef MODULE
136
 
$(error Must define MODULE when defining XPCSHELL_TESTS.)
 
125
ifndef relativesrcdir
 
126
$(error Must define relativesrcdir when defining XPCSHELL_TESTS.)
137
127
endif
138
128
 
139
 
testxpcobjdir = $(DEPTH)/_tests/xpcshell
140
 
 
141
129
# Test file installation
142
130
ifneq (,$(filter WINNT os2-emx,$(HOST_OS_ARCH)))
143
131
# Windows and OS/2 nsinstall can't recursively copy directories, so use nsinstall.py
147
135
endif
148
136
 
149
137
define _INSTALL_TESTS
150
 
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(MODULE)/$(dir)
 
138
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(relativesrcdir)/$(dir)
151
139
 
152
140
endef # do not remove the blank line!
153
141
 
155
143
 
156
144
libs::
157
145
        $(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
158
 
        $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
159
 
          $(testxpcobjdir)/all-test-dirs.list \
160
 
          $(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
 
146
        $(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
 
147
          $(testxpcobjdir)/all-test-dirs.list \
 
148
          $(addprefix $(relativesrcdir)/,$(XPCSHELL_TESTS))
161
149
 
162
150
testxpcsrcdir = $(topsrcdir)/testing/xpcshell
163
151
 
165
153
# See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
166
154
xpcshell-tests:
167
155
        $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
168
 
          -I$(topsrcdir)/build \
169
 
          $(testxpcsrcdir)/runxpcshelltests.py \
170
 
          --symbols-path=$(DIST)/crashreporter-symbols \
171
 
          $(DIST)/bin/xpcshell \
172
 
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
156
          -I$(topsrcdir)/build \
 
157
          $(testxpcsrcdir)/runxpcshelltests.py \
 
158
          --symbols-path=$(DIST)/crashreporter-symbols \
 
159
          $(EXTRA_TEST_ARGS) \
 
160
          $(DIST)/bin/xpcshell \
 
161
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
173
162
 
174
163
# Execute a single test, specified in $(SOLO_FILE), but don't automatically
175
164
# start the test. Instead, present the xpcshell prompt so the user can
176
165
# attach a debugger and then start the test.
177
166
check-interactive:
178
167
        $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
179
 
          -I$(topsrcdir)/build \
180
 
          $(testxpcsrcdir)/runxpcshelltests.py \
181
 
          --symbols-path=$(DIST)/crashreporter-symbols \
182
 
          --test-path=$(SOLO_FILE) \
183
 
          --interactive \
184
 
          $(DIST)/bin/xpcshell \
185
 
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
168
          -I$(topsrcdir)/build \
 
169
          $(testxpcsrcdir)/runxpcshelltests.py \
 
170
          --symbols-path=$(DIST)/crashreporter-symbols \
 
171
          --test-path=$(SOLO_FILE) \
 
172
          --profile-name=$(MOZ_APP_NAME) \
 
173
          --interactive \
 
174
          $(DIST)/bin/xpcshell \
 
175
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
186
176
 
187
177
# Execute a single test, specified in $(SOLO_FILE)
188
178
check-one:
189
179
        $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
190
 
          -I$(topsrcdir)/build \
191
 
          $(testxpcsrcdir)/runxpcshelltests.py \
192
 
          --symbols-path=$(DIST)/crashreporter-symbols \
193
 
          --test-path=$(SOLO_FILE) \
194
 
          $(DIST)/bin/xpcshell \
195
 
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
180
          -I$(topsrcdir)/build \
 
181
          $(testxpcsrcdir)/runxpcshelltests.py \
 
182
          --symbols-path=$(DIST)/crashreporter-symbols \
 
183
          --test-path=$(SOLO_FILE) \
 
184
          --profile-name=$(MOZ_APP_NAME) \
 
185
          --verbose \
 
186
          $(EXTRA_TEST_ARGS) \
 
187
          $(DIST)/bin/xpcshell \
 
188
          $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
196
189
 
197
190
endif # XPCSHELL_TESTS
198
191
 
209
202
# ...and run them the usual way
210
203
check::
211
204
        @$(EXIT_ON_ERROR) \
212
 
          for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
 
205
          for f in $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)); do \
213
206
            XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
214
207
          done
215
208
 
229
222
 
230
223
ifndef LIBRARY
231
224
ifdef STATIC_LIBRARY_NAME
232
 
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
233
 
ifdef SHORT_LIBNAME
234
 
STATIC_LIBRARY_NAME     := $(SHORT_LIBNAME)
235
 
SHARED_LIBRARY_NAME     := $(SHORT_LIBNAME)
236
 
endif
237
 
endif
238
 
LIBRARY                 := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
 
225
_LIBRARY                := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
 
226
# Only build actual library if it is installed in DIST/lib or SDK
 
227
ifeq (,$(SDK_LIBRARY)$(DIST_INSTALL)$(NO_EXPAND_LIBS))
 
228
LIBRARY                 := $(_LIBRARY).$(LIBS_DESC_SUFFIX)
 
229
else
 
230
LIBRARY                 := $(_LIBRARY) $(_LIBRARY).$(LIBS_DESC_SUFFIX)
 
231
endif
239
232
endif # STATIC_LIBRARY_NAME
240
233
endif # LIBRARY
241
234
 
253
246
MKSHLIB                 = $(MKCSHLIB)
254
247
endif
255
248
 
 
249
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
 
250
IMPORT_LIBRARY          := $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
 
251
endif
 
252
 
 
253
ifeq (OS2,$(OS_ARCH))
 
254
ifdef SHORT_LIBNAME
 
255
SHARED_LIBRARY_NAME     := $(SHORT_LIBNAME)
 
256
endif
 
257
endif
 
258
 
256
259
ifdef MAKE_FRAMEWORK
257
260
SHARED_LIBRARY          := $(SHARED_LIBRARY_NAME)
258
261
else
263
266
DEF_FILE                := $(SHARED_LIBRARY:.dll=.def)
264
267
endif
265
268
 
266
 
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
267
 
IMPORT_LIBRARY          := $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
268
 
endif
269
 
 
270
269
ifdef MOZ_ENABLE_LIBXUL
271
270
EMBED_MANIFEST_AT=2
272
271
endif
348
347
endif # !GNU_CC
349
348
 
350
349
ifdef ENABLE_CXX_EXCEPTIONS
351
 
ifdef GNU_CC
352
 
CXXFLAGS                += -fexceptions
353
 
else
354
 
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
355
 
CXXFLAGS                += -GX
356
 
else
357
 
CXXFLAGS                += -EHsc
358
 
endif # _MSC_VER
359
 
endif # GNU_CC
 
350
CXXFLAGS += $(MOZ_EXCEPTIONS_FLAGS_ON) -DMOZ_CPP_EXCEPTIONS=1
360
351
endif # ENABLE_CXX_EXCEPTIONS
361
352
endif # WINNT
362
353
 
 
354
ifeq ($(SOLARIS_SUNPRO_CXX),1)
 
355
ifeq (86,$(findstring 86,$(OS_TEST)))
 
356
OS_LDFLAGS += -M $(topsrcdir)/config/solaris_ia32.map
 
357
endif # x86
 
358
endif # Solaris Sun Studio C++
 
359
 
363
360
ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH)))
364
361
HOST_PDBFILE=$(basename $(@F)).pdb
365
362
endif
373
370
        $(JRI_STUB_CFILES) \
374
371
        $(addsuffix .$(OBJ_SUFFIX), $(JMC_GEN)) \
375
372
        $(CSRCS:.c=.$(OBJ_SUFFIX)) \
 
373
        $(SSRCS:.S=.$(OBJ_SUFFIX)) \
376
374
        $(patsubst %.cc,%.$(OBJ_SUFFIX),$(CPPSRCS:.cpp=.$(OBJ_SUFFIX))) \
377
375
        $(CMSRCS:.m=.$(OBJ_SUFFIX)) \
378
376
        $(CMMSRCS:.mm=.$(OBJ_SUFFIX)) \
436
434
GARBAGE_DIRS += SunWS_cache
437
435
endif
438
436
 
439
 
ifeq ($(OS_ARCH),OpenVMS)
440
 
GARBAGE                 += $(wildcard *.*_defines)
441
 
ifdef SHARED_LIBRARY
442
 
VMS_SYMVEC_FILE         = $(SHARED_LIBRARY:$(DLL_SUFFIX)=_symvec.opt)
443
 
ifdef MOZ_DEBUG
444
 
VMS_SYMVEC_FILE_MODULE  = $(topsrcdir)/build/unix/vms/$(notdir $(SHARED_LIBRARY:$(DLL_SUFFIX)=_dbg_symvec.opt))
445
 
else
446
 
VMS_SYMVEC_FILE_MODULE  = $(topsrcdir)/build/unix/vms/$(notdir $(SHARED_LIBRARY:$(DLL_SUFFIX)=_symvec.opt))
447
 
endif
448
 
VMS_SYMVEC_FILE_COMP    = $(topsrcdir)/build/unix/vms/component_symvec.opt
449
 
GARBAGE                 += $(VMS_SYMVEC_FILE)
450
 
ifdef IS_COMPONENT
451
 
DSO_LDOPTS := $(filter-out -auto_symvec,$(DSO_LDOPTS)) $(VMS_SYMVEC_FILE)
452
 
endif
453
 
endif
454
 
endif
455
 
 
456
437
XPIDL_GEN_DIR           = _xpidlgen
457
438
 
458
439
ifdef MOZ_UPDATE_XTERM
463
444
endif
464
445
 
465
446
define SUBMAKE # $(call SUBMAKE,target,directory)
466
 
@$(UPDATE_TITLE)
 
447
+@$(UPDATE_TITLE)
467
448
+@$(MAKE) $(if $(2),-C $(2)) $(1)
468
449
 
469
450
endef # The extra line is important here! don't delete it
532
513
ifneq ($(CPPSRCS)$(CMMSRCS),)
533
514
CPP_PROG_LINK           = 1
534
515
endif
535
 
 
536
 
#
537
 
# Make sure to wrap static libs inside linker specific flags to turn on & off
538
 
# inclusion of all symbols inside the static libs
539
 
#
540
 
ifndef NO_LD_ARCHIVE_FLAGS
541
 
ifdef SHARED_LIBRARY_LIBS
542
 
EXTRA_DSO_LDOPTS := $(MKSHLIB_FORCE_ALL) $(SHARED_LIBRARY_LIBS) $(MKSHLIB_UNFORCE_ALL) $(EXTRA_DSO_LDOPTS)
543
 
endif
 
516
ifneq ($(HOST_CPPSRCS)$(HOST_CMMSRCS),)
 
517
HOST_CPP_PROG_LINK      = 1
544
518
endif
545
519
 
546
520
#
606
580
endif
607
581
endif
608
582
 
609
 
ifeq ($(OS_ARCH),Linux)
610
 
ifneq (,$(filter mips mipsel,$(OS_TEST)))
611
 
ifeq ($(MODULE),layout)
612
 
OS_CFLAGS += -Wa,-xgot
613
 
OS_CXXFLAGS += -Wa,-xgot
614
 
endif
615
 
endif
616
 
endif
617
 
 
618
583
#
619
584
# HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
620
585
# which uses internal symbols first
665
630
endif 
666
631
 
667
632
#
 
633
# GNU doesn't have path length limitation
 
634
#
 
635
 
 
636
ifeq ($(OS_ARCH),GNU)
 
637
OS_CPPFLAGS += -DPATH_MAX=1024 -DMAXPATHLEN=1024
 
638
endif
 
639
 
 
640
#
668
641
# MINGW32
669
642
#
670
643
ifeq ($(OS_ARCH),WINNT)
692
665
OUTOPTION = -Fo# eol
693
666
endif
694
667
 
695
 
ifeq ($(OS_TARGET), WINCE)
 
668
ifeq ($(OS_ARCH), WINCE)
696
669
OUTOPTION = -Fo# eol
697
670
HOST_OUTOPTION = -Fo# eol
698
671
else
768
741
        $(foreach dir,$($@_staticdirs),$(call SUBMAKE,,$(dir)))
769
742
        $(MAKE) export_$@
770
743
        $(MAKE) libs_$@
 
744
        $(MAKE) tools_$@
771
745
 
772
746
# Do everything from scratch
773
747
everything::
817
791
ifdef EXPORT_LIBRARY
818
792
ifdef IS_COMPONENT
819
793
ifdef BUILD_STATIC_LIBS
820
 
        @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
 
794
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
821
795
ifdef MODULE_NAME
822
 
        @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
 
796
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
823
797
endif
824
798
endif # BUILD_STATIC_LIBS
825
 
else  # !IS_COMPONENT
826
 
        $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
 
799
else # !IS_COMPONENT
 
800
        $(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
827
801
endif # IS_COMPONENT
828
802
endif # EXPORT_LIBRARY
829
803
endif # LIBRARY_NAME
830
804
 
 
805
ifneq (,$(filter-out %.$(LIB_SUFFIX),$(SHARED_LIBRARY_LIBS)))
 
806
$(error SHARED_LIBRARY_LIBS must contain .$(LIB_SUFFIX) files only)
 
807
endif
 
808
 
831
809
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
832
 
LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(LIBS))
833
 
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
834
 
DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
 
810
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)))))
 
811
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS)))
 
812
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
 
813
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
 
814
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
835
815
 
836
 
# Dependancies which, if modified, should cause everything to rebuild
 
816
# Dependencies which, if modified, should cause everything to rebuild
837
817
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
838
818
 
839
819
##############################################
844
824
        +@$(call SUBMAKE,libs,$*)
845
825
endif
846
826
 
 
827
ifdef EXPORT_LIBRARY
 
828
ifeq ($(EXPORT_LIBRARY),1)
 
829
ifdef IS_COMPONENT
 
830
EXPORT_LIBRARY = $(DEPTH)/staticlib/components
 
831
else
 
832
EXPORT_LIBRARY = $(DEPTH)/staticlib
 
833
endif
 
834
else
 
835
# If EXPORT_LIBRARY has a value, we'll be installing there. We also need to cleanup there
 
836
GARBAGE += $(foreach lib,$(LIBRARY),$(EXPORT_LIBRARY)/$(lib))
 
837
endif
 
838
endif # EXPORT_LIBRARY
 
839
 
847
840
libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)
848
841
ifndef NO_DIST_INSTALL
849
842
ifdef LIBRARY
850
843
ifdef EXPORT_LIBRARY # Stage libs that will be linked into a static build
851
 
ifdef IS_COMPONENT
852
 
        $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DEPTH)/staticlib/components
853
 
else
854
 
        $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DEPTH)/staticlib
855
 
endif
 
844
        $(INSTALL) $(IFLAGS1) $(LIBRARY) $(EXPORT_LIBRARY)
856
845
endif # EXPORT_LIBRARY
857
846
ifdef DIST_INSTALL
858
847
ifdef IS_COMPONENT
866
855
ifdef IS_COMPONENT
867
856
        $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
868
857
        $(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
869
 
        @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
870
 
ifdef BEOS_ADDON_WORKAROUND
871
 
        ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
 
858
ifndef NO_COMPONENTS_MANIFEST
 
859
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "manifest components/components.manifest"
 
860
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.manifest "binary-component $(SHARED_LIBRARY)"
872
861
endif
873
862
else # ! IS_COMPONENT
874
863
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
877
866
        $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
878
867
endif
879
868
        $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)
880
 
ifdef BEOS_ADDON_WORKAROUND
881
 
        ( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
882
 
endif
883
869
endif # IS_COMPONENT
884
870
endif # SHARED_LIBRARY
885
871
ifdef PROGRAM
910
896
##############################################
911
897
 
912
898
ifndef NO_PROFILE_GUIDED_OPTIMIZE
913
 
ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
914
 
ifeq ($(OS_ARCH)_$(GNU_CC)$(INTERNAL_TOOLS), WINNT_)
915
 
# Force re-linking when building with PGO, since
916
 
# the MSVC linker does all the work.  We force re-link
917
 
# in both stages so you can do depend builds with PGO.
918
 
ifdef SHARED_LIBRARY
919
 
$(SHARED_LIBRARY): FORCE
920
 
endif
921
 
ifdef PROGRAM
922
 
$(PROGRAM): FORCE
923
 
endif
924
 
 
925
899
ifdef MOZ_PROFILE_USE
 
900
ifeq ($(OS_ARCH)_$(GNU_CC), WINNT_)
 
901
# When building with PGO, we have to make sure to re-link
 
902
# in the MOZ_PROFILE_USE phase if we linked in the
 
903
# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink
 
904
# file in the link rule in the GENERATE phase to indicate
 
905
# that we need a relink.
 
906
ifdef SHARED_LIBRARY
 
907
$(SHARED_LIBRARY): pgo.relink
 
908
endif
 
909
ifdef PROGRAM
 
910
$(PROGRAM): pgo.relink
 
911
endif
 
912
 
926
913
# In the second pass, we need to merge the pgc files into the pgd file.
927
914
# The compiler would do this for us automatically if they were in the right
928
915
# place, but they're in dist/bin.
930
917
export::
931
918
ifdef PROGRAM
932
919
        $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
933
 
          $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
 
920
          $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/$(MOZ_APP_NAME)
934
921
endif
935
922
ifdef SHARED_LIBRARY
936
923
        $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
937
 
          $(SHARED_LIBRARY_NAME) $(DIST)/bin
938
 
endif
939
 
endif
940
 
endif # MOZ_PROFILE_USE
 
924
          $(SHARED_LIBRARY_NAME) $(DIST)/$(MOZ_APP_NAME)
 
925
endif
 
926
endif # SHARED_LIBRARY || PROGRAM
941
927
endif # WINNT_
942
928
endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
943
929
endif # NO_PROFILE_GUIDED_OPTIMIZE
948
934
        $(MAKE) -C $(topsrcdir) -f client.mk checkout
949
935
 
950
936
clean clobber realclean clobber_all:: $(SUBMAKEFILES)
951
 
        -rm -f $(ALL_TRASH)
952
 
        -rm -rf $(ALL_TRASH_DIRS)
 
937
        -$(RM) $(ALL_TRASH)
 
938
        -$(RM) -r $(ALL_TRASH_DIRS)
953
939
        $(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(STATIC_DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
954
940
 
955
941
distclean:: $(SUBMAKEFILES)
956
942
        $(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(STATIC_DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
957
 
        -rm -rf $(ALL_TRASH_DIRS) 
958
 
        -rm -f $(ALL_TRASH)  \
 
943
        -$(RM) -r $(ALL_TRASH_DIRS) 
 
944
        -$(RM) $(ALL_TRASH)  \
959
945
        Makefile .HSancillary \
960
946
        $(wildcard *.$(OBJ_SUFFIX)) $(wildcard *.ho) $(wildcard host_*.o*) \
961
947
        $(wildcard *.$(LIB_SUFFIX)) $(wildcard *$(DLL_SUFFIX)) \
962
948
        $(wildcard *.$(IMPORT_LIB_SUFFIX))
963
949
ifeq ($(OS_ARCH),OS2)
964
 
        -rm -f $(PROGRAM:.exe=.map)
 
950
        -$(RM) $(PROGRAM:.exe=.map)
965
951
endif
966
952
 
967
953
alltags:
968
 
        rm -f TAGS
 
954
        $(RM) TAGS
969
955
        find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
970
956
 
971
957
#
973
959
# creates OBJS, links with LIBS to create Foo
974
960
#
975
961
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
976
 
        @rm -f $@.manifest
 
962
        @$(RM) $@.manifest
977
963
ifeq (WINCE,$(OS_ARCH))
978
 
        $(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 
964
        $(EXPAND_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
979
965
else
980
966
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
981
 
        $(LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 
967
        $(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
982
968
ifdef MSMANIFEST_TOOL
983
969
        @if test -f $@.manifest; then \
984
970
                if test -f "$(srcdir)/$@.manifest"; then \
993
979
                mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" -OUTPUTRESOURCE:$@\;1; \
994
980
        fi
995
981
endif   # MSVC with manifest tool
996
 
else
 
982
ifdef MOZ_PROFILE_GENERATE
 
983
# touch it a few seconds into the future to work around FAT's
 
984
# 2-second granularity
 
985
        touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
 
986
endif
 
987
else # !WINNT || GNU_CC
997
988
ifeq ($(CPP_PROG_LINK),1)
998
 
        $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(EXE_DEF_FILE)
 
989
        $(EXPAND_CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE)
999
990
else # ! CPP_PROG_LINK
1000
 
        $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
 
991
        $(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
1001
992
endif # CPP_PROG_LINK
1002
993
endif # WINNT && !GNU_CC
1003
994
endif # WINCE
1008
999
ifdef MOZ_POST_PROGRAM_COMMAND
1009
1000
        $(MOZ_POST_PROGRAM_COMMAND) $@
1010
1001
endif
1011
 
ifeq ($(OS_ARCH),BeOS)
1012
 
ifdef BEOS_PROGRAM_RESOURCE
1013
 
        xres -o $@ $(BEOS_PROGRAM_RESOURCE)
1014
 
        mimeset $@
1015
 
endif
1016
 
endif # BeOS
1017
1002
 
1018
1003
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
1019
1004
ifeq (WINCE,$(OS_ARCH))
1024
1009
ifdef MSMANIFEST_TOOL
1025
1010
        @if test -f $@.manifest; then \
1026
1011
                if test -f "$(srcdir)/$@.manifest"; then \
 
1012
                        echo "Embedding manifest from $(srcdir)/$@.manifest and $@.manifest"; \
1027
1013
                        mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
1028
1014
                else \
 
1015
                        echo "Embedding manifest from $@.manifest"; \
1029
1016
                        mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
1030
1017
                fi; \
1031
 
                rm -f $@.manifest; \
 
1018
        elif test -f "$(srcdir)/$@.manifest"; then \
 
1019
                echo "Embedding manifest from $(srcdir)/$@.manifest"; \
 
1020
                mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" -OUTPUTRESOURCE:$@\;1; \
1032
1021
        fi
1033
1022
endif   # MSVC with manifest tool
1034
1023
else
1035
 
ifeq ($(CPP_PROG_LINK),1)
 
1024
ifeq ($(HOST_CPP_PROG_LINK),1)
1036
1025
        $(HOST_CXX) -o $@ $(HOST_CXXFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
1037
1026
else
1038
1027
        $(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
1039
 
endif # CPP_PROG_LINK
 
1028
endif # HOST_CPP_PROG_LINK
1040
1029
endif
1041
1030
endif
1042
1031
 
1050
1039
#
1051
1040
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
1052
1041
ifeq (WINCE,$(OS_ARCH))
1053
 
        $(LD) -nologo  -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 
1042
        $(EXPAND_LD) -nologo  -entry:mainACRTStartup -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
1054
1043
else
1055
1044
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
1056
 
        $(LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 
1045
        $(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
1057
1046
ifdef MSMANIFEST_TOOL
1058
1047
        @if test -f $@.manifest; then \
1059
1048
                mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
1062
1051
endif   # MSVC with manifest tool
1063
1052
else
1064
1053
ifeq ($(CPP_PROG_LINK),1)
1065
 
        $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
 
1054
        $(EXPAND_CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS)
1066
1055
else
1067
 
        $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
 
1056
        $(EXPAND_CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS)
1068
1057
endif # CPP_PROG_LINK
1069
1058
endif # WINNT && !GNU_CC
1070
1059
endif # WINCE
1116
1105
        $(INSTALL) $(IFLAGS2) $^.quantify $(FINAL_TARGET)
1117
1106
endif
1118
1107
 
1119
 
#
1120
 
# This allows us to create static versions of the shared libraries
1121
 
# that are built using other static libraries.  Confused...?
1122
 
#
1123
 
ifdef SHARED_LIBRARY_LIBS
1124
 
ifeq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
1125
 
ifneq (,$(BUILD_STATIC_LIBS)$(FORCE_STATIC_LIB))
1126
 
LOBJS   += $(SHARED_LIBRARY_LIBS)
1127
 
endif
1128
 
else
1129
 
ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS Darwin,$(OS_ARCH)))
1130
 
CLEANUP1        := | egrep -v '(________64ELEL_|__.SYMDEF)'
1131
 
CLEANUP2        := rm -f ________64ELEL_ __.SYMDEF
1132
 
else
1133
 
CLEANUP2        := true
1134
 
endif
1135
 
SUB_LOBJS       = $(shell for lib in $(SHARED_LIBRARY_LIBS); do $(AR_LIST) $${lib} $(CLEANUP1); done;)
1136
 
endif
1137
 
endif
1138
 
ifdef MOZILLA_PROBE_LIBS
1139
 
PROBE_LOBJS     = $(shell for lib in $(MOZILLA_PROBE_LIBS); do $(AR_LIST) $${lib} $(CLEANUP1); done;)
1140
 
endif
1141
1108
ifdef DTRACE_PROBE_OBJ
1142
1109
EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
1143
1110
endif
1144
1111
 
1145
 
$(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
1146
 
        rm -f $@
1147
 
ifneq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
1148
 
ifdef SHARED_LIBRARY_LIBS
1149
 
        @rm -f $(SUB_LOBJS)
1150
 
        @for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
1151
 
endif
1152
 
endif
1153
 
        $(AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SUB_LOBJS)
 
1112
$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 
1113
        $(RM) $(LIBRARY)
 
1114
        $(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS)
1154
1115
        $(RANLIB) $@
1155
 
        @rm -f foodummyfilefoo $(SUB_LOBJS)
 
1116
 
 
1117
$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 
1118
        $(EXPAND_LIBS_GEN) $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) > $@
1156
1119
 
1157
1120
ifeq (,$(filter-out WINNT WINCE, $(OS_ARCH)))
1158
1121
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
1160
1123
 
1161
1124
ifeq ($(OS_ARCH),OS2)
1162
1125
$(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)
1163
 
        rm -f $@
 
1126
        $(RM) $@
1164
1127
        echo LIBRARY $(SHARED_LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
1165
1128
        echo PROTMODE >> $@
1166
1129
        echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
1167
1130
        echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
1168
1131
        echo EXPORTS >> $@
1169
 
ifeq ($(IS_COMPONENT),1)
1170
 
ifeq ($(HAS_EXTRAEXPORTS),1)
1171
 
ifndef MOZ_OS2_USE_DECLSPEC
1172
 
        $(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
1173
 
endif   
1174
 
else
1175
 
        echo    _NSGetModule >> $@
1176
 
endif
1177
 
else
1178
 
ifndef MOZ_OS2_USE_DECLSPEC
1179
 
        $(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
1180
 
endif   
1181
 
endif
 
1132
 
1182
1133
        $(ADD_TO_DEF_FILE)
1183
1134
 
1184
 
ifdef MOZ_OS2_USE_DECLSPEC
1185
1135
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
1186
 
else
1187
 
$(IMPORT_LIBRARY): $(DEF_FILE)
1188
 
endif
1189
 
        rm -f $@
 
1136
        $(RM) $@
1190
1137
        $(IMPLIB) $@ $^
1191
1138
        $(RANLIB) $@
1192
1139
endif # OS/2
1193
1140
 
1194
1141
$(HOST_LIBRARY): $(HOST_OBJS) Makefile
1195
 
        rm -f $@
 
1142
        $(RM) $@
1196
1143
        $(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
1197
1144
        $(HOST_RANLIB) $@
1198
1145
 
1199
 
ifdef NO_LD_ARCHIVE_FLAGS
1200
 
SUB_SHLOBJS = $(SUB_LOBJS)
1201
 
endif
1202
 
 
1203
1146
ifdef HAVE_DTRACE
1204
1147
ifndef XP_MACOSX
1205
1148
ifdef DTRACE_PROBE_OBJ
1206
1149
ifndef DTRACE_LIB_DEPENDENT
1207
1150
$(DTRACE_PROBE_OBJ): $(OBJS)
1208
 
        dtrace -G -C -32 -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(OBJS)
 
1151
        dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(OBJS)
1209
1152
endif
1210
1153
endif
1211
1154
endif
1216
1159
# symlinks back to the originals. The symlinks are a no-op for stabs debugging,
1217
1160
# so no need to conditionalize on OS version or debugging format.
1218
1161
 
1219
 
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
 
1162
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS_DEPS) $(LIBRARY) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
1220
1163
ifndef INCREMENTAL_LINKER
1221
 
        rm -f $@
1222
 
endif
1223
 
ifeq ($(OS_ARCH),OpenVMS)
1224
 
        @if test ! -f $(VMS_SYMVEC_FILE); then \
1225
 
          if test -f $(VMS_SYMVEC_FILE_MODULE); then \
1226
 
            echo Creating specific component options file $(VMS_SYMVEC_FILE); \
1227
 
            cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \
1228
 
          fi; \
1229
 
        fi
1230
 
ifdef IS_COMPONENT
1231
 
        @if test ! -f $(VMS_SYMVEC_FILE); then \
1232
 
          echo Creating generic component options file $(VMS_SYMVEC_FILE); \
1233
 
          cp $(VMS_SYMVEC_FILE_COMP) $(VMS_SYMVEC_FILE); \
1234
 
        fi
1235
 
endif
1236
 
endif # OpenVMS
1237
 
ifdef NO_LD_ARCHIVE_FLAGS
1238
 
ifdef SHARED_LIBRARY_LIBS
1239
 
        @rm -f $(SUB_SHLOBJS)
1240
 
        @for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
1241
 
ifeq ($(OS_ARCH),Darwin)
1242
 
        @echo Making symlinks to the original object files in the archive libraries $(SHARED_LIBRARY_LIBS)
1243
 
        @for lib in $(SHARED_LIBRARY_LIBS); do \
1244
 
                libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
1245
 
                ofiles=`$(AR_LIST) $${lib}`; \
1246
 
                for ofile in $$ofiles; do \
1247
 
                        if [ -f $$libdir/$$ofile ]; then \
1248
 
                                rm -f $$ofile; \
1249
 
                                ln -s $$libdir/$$ofile $$ofile; \
1250
 
                        fi; \
1251
 
                done; \
1252
 
        done
1253
 
endif
1254
 
endif # SHARED_LIBRARY_LIBS
1255
 
endif # NO_LD_ARCHIVE_FLAGS
 
1164
        $(RM) $@
 
1165
endif
1256
1166
ifdef DTRACE_LIB_DEPENDENT
1257
 
        @rm -f $(PROBE_LOBJS)
1258
 
        @for lib in $(MOZILLA_PROBE_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
1259
1167
ifndef XP_MACOSX
1260
 
        dtrace -G -C -32 -s $(MOZILLA_DTRACE_SRC) -o  $(DTRACE_PROBE_OBJ) $(PROBE_LOBJS)
 
1168
        dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o  $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
1261
1169
endif
1262
 
        @for lib in $(MOZILLA_PROBE_LIBS); do \
1263
 
                ofiles=`$(AR_LIST) $${lib}`; \
1264
 
                $(AR_DELETE) $${lib} $$ofiles; \
1265
 
        done
1266
 
        $(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(PROBE_LOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
1267
 
        @rm -f $(PROBE_LOBJS)
1268
 
        @rm -f $(DTRACE_PROBE_OBJ)
1269
 
        @for lib in $(MOZILLA_PROBE_LIBS); do \
1270
 
                if [ -L $${lib} ]; then rm -f `readlink $${lib}`; fi; \
1271
 
        done
1272
 
        @rm -f $(MOZILLA_PROBE_LIBS)
1273
 
 
 
1170
        $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
 
1171
        @$(RM) $(DTRACE_PROBE_OBJ)
1274
1172
else # ! DTRACE_LIB_DEPENDENT
1275
 
        $(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(DTRACE_PROBE_OBJ) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
 
1173
        $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(DTRACE_PROBE_OBJ) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
1276
1174
endif # DTRACE_LIB_DEPENDENT
1277
1175
 
1278
1176
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
1284
1182
        fi
1285
1183
endif   # EMBED_MANIFEST_AT
1286
1184
endif   # MSVC with manifest tool
 
1185
ifdef MOZ_PROFILE_GENERATE
 
1186
        touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
 
1187
endif
1287
1188
endif   # WINNT && !GCC
1288
 
ifeq ($(OS_ARCH),Darwin)
1289
 
else # non-Darwin
1290
 
        @rm -f $(SUB_SHLOBJS)
1291
 
endif # Darwin
1292
 
        @rm -f foodummyfilefoo $(DELETE_AFTER_LINK)
 
1189
        @$(RM) foodummyfilefoo $(DELETE_AFTER_LINK)
1293
1190
        chmod +x $@
1294
1191
ifdef ENABLE_STRIP
1295
1192
        $(STRIP) $@
1325
1222
define MAKE_DEPS_AUTO
1326
1223
if test -d $(@D); then \
1327
1224
        echo "Building deps for $<"; \
1328
 
        $(MKDEPEND) -o'.$(OBJ_SUFFIX)' -f- $(DEFINES) $(ACDEFINES) $(INCLUDES) $< 2>/dev/null | sed -e "s|^[^ ]*/||" > $(_MDDEPFILE) ; \
 
1225
        $(MKDEPEND) -o'.$(OBJ_SUFFIX)' -f- $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(INCLUDES) $< 2>/dev/null | sed -e "s|^[^ ]*/||" > $(_MDDEPFILE) ; \
1329
1226
fi
1330
1227
endef
1331
1228
 
1336
1233
 
1337
1234
endif # MOZ_AUTO_DEPS
1338
1235
 
1339
 
ifdef MOZ_MEMORY
1340
 
ifeq ($(OS_ARCH),SunOS)
1341
 
SOLARIS_JEMALLOC_LDFLAGS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib)
1342
 
endif
1343
 
endif
1344
 
 
1345
1236
# Rules for building native targets must come first because of the host_ prefix
1346
1237
host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
1347
1238
        $(REPORT_BUILD)
1373
1264
        @$(MAKE_DEPS_AUTO_CC)
1374
1265
        $(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
1375
1266
 
 
1267
# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
 
1268
# 'moc' only knows about #defines it gets on the command line (-D...), not in 
 
1269
# included headers like mozilla-config.h
1376
1270
moc_%.cpp: %.h $(GLOBAL_DEPS)
1377
 
        $(MOC) $< $(OUTOPTION)$@ 
 
1271
        $(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@ 
 
1272
 
 
1273
moc_%.cc: %.cc $(GLOBAL_DEPS)
 
1274
        $(REPORT_BUILD)
 
1275
        $(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $(_VPATH_SRCS:.cc=.h) $(OUTOPTION)$@
1378
1276
 
1379
1277
ifdef ASFILES
1380
1278
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1404
1302
ifdef STRICT_CPLUSPLUS_SUFFIX
1405
1303
        echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > t_$*.cc
1406
1304
        $(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) t_$*.cc
1407
 
        rm -f t_$*.cc
 
1305
        $(RM) t_$*.cc
1408
1306
else
1409
1307
        $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
1410
1308
endif #STRICT_CPLUSPLUS_SUFFIX
1454
1352
 
1455
1353
# need 3 separate lines for OS/2
1456
1354
%:: %.pl
1457
 
        rm -f $@
 
1355
        $(RM) $@
1458
1356
        cp $< $@
1459
1357
        chmod +x $@
1460
1358
 
1461
1359
%:: %.sh
1462
 
        rm -f $@; cp $< $@; chmod +x $@
 
1360
        $(RM) $@
 
1361
        cp $< $@
 
1362
        chmod +x $@
1463
1363
 
1464
1364
# Cancel these implicit rules
1465
1365
#
1483
1383
EMPTY :=
1484
1384
SPACE := $(EMPTY) $(EMPTY)
1485
1385
 
1486
 
# Cygwin and MSYS have their own special path form, but javac expects the source
1487
 
# and class paths to be in the DOS form (i.e. e:/builds/...).  This function
1488
 
# does the appropriate conversion on Windows, but is a noop on other systems.
 
1386
# MSYS has its own special path form, but javac expects the source and class
 
1387
# paths to be in the DOS form (i.e. e:/builds/...).  This function does the
 
1388
# appropriate conversion on Windows, but is a noop on other systems.
1489
1389
ifeq (,$(filter-out WINNT WINCE, $(HOST_OS_ARCH)))
1490
 
ifdef CYGWIN_WRAPPER
1491
 
normalizepath = $(foreach p,$(1),$(shell cygpath -m $(p)))
1492
 
else
1493
 
# assume MSYS
1494
1390
#  We use 'pwd -W' to get DOS form of the path.  However, since the given path
1495
1391
#  could be a file or a non-existent path, we cannot call 'pwd -W' directly
1496
1392
#  on the path.  Instead, we extract the root path (i.e. "c:/"), call 'pwd -W'
1498
1394
root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\1|")
1499
1395
non-root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\2|")
1500
1396
normalizepath = $(foreach p,$(1),$(if $(filter /%,$(1)),$(patsubst %/,%,$(shell cd $(call root-path,$(1)) && pwd -W))/$(call non-root-path,$(1)),$(1)))
1501
 
endif
1502
1397
else
1503
1398
normalizepath = $(1)
1504
1399
endif
1523
1418
        $(NSINSTALL) -D $@
1524
1419
 
1525
1420
$(_JAVA_DIR)/%.class: %.java $(GLOBAL_DEPS) $(_JAVA_DIR)
1526
 
        $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(_JAVA_CLASSPATH) \
 
1421
        $(JAVAC) $(JAVAC_FLAGS) -classpath $(_JAVA_CLASSPATH) \
1527
1422
                        -sourcepath $(_JAVA_SOURCEPATH) -d $(_JAVA_DIR) $(_VPATH_SRCS)
1528
1423
 
1529
1424
$(JAVA_LIBRARY): $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)) $(GLOBAL_DEPS)
1535
1430
# Update Makefiles
1536
1431
###############################################################################
1537
1432
 
1538
 
# In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
1539
 
# processing them with AS perl. See bug 232003
1540
 
ifdef AS_PERL
1541
 
CYGWIN_TOPSRCDIR = -nowrap -p $(topsrcdir) -wrap
1542
 
endif
1543
 
 
1544
1433
# Note: Passing depth to make-makefile is optional.
1545
1434
#       It saves the script some work, though.
1546
1435
Makefile: Makefile.in
1547
 
        @$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $(CYGWIN_TOPSRCDIR)
 
1436
        @$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH)
1548
1437
 
1549
1438
ifdef SUBMAKEFILES
1550
1439
# VPATH does not work on some machines in this case, so add $(srcdir)
1551
1440
$(SUBMAKEFILES): % : $(srcdir)/%.in
1552
 
        $(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $(CYGWIN_TOPSRCDIR) $@
 
1441
        $(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $@
1553
1442
endif
1554
1443
 
1555
1444
ifdef AUTOUPDATE_CONFIGURE
1564
1453
################################################################################
1565
1454
# Copy each element of EXPORTS to $(DIST)/include
1566
1455
 
1567
 
ifdef MOZ_JAVAXPCOM
1568
 
ifneq ($(XPIDLSRCS),)
1569
 
$(JAVA_DIST_DIR)::
1570
 
        $(NSINSTALL) -D $@
1571
 
endif
1572
 
endif
1573
 
 
1574
1456
ifneq ($(XPI_NAME),)
1575
1457
$(FINAL_TARGET):
1576
1458
        $(NSINSTALL) -D $@
1667
1549
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(DIST)/include;
1668
1550
# warn against overriding existing .h file. 
1669
1551
$(XPIDL_GEN_DIR)/.done:
1670
 
        @if test ! -d $(XPIDL_GEN_DIR); then echo Creating $(XPIDL_GEN_DIR)/.done; rm -rf $(XPIDL_GEN_DIR); mkdir $(XPIDL_GEN_DIR); fi
1671
 
        @touch $@
 
1552
        $(MKDIR) -p $(XPIDL_GEN_DIR)
 
1553
        @$(TOUCH) $@
1672
1554
 
1673
1555
# don't depend on $(XPIDL_GEN_DIR), because the modification date changes
1674
1556
# with any addition to the directory, regenerating all .h files -> everything.
1695
1577
libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
1696
1578
ifndef NO_DIST_INSTALL
1697
1579
        $(INSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components
 
1580
ifndef NO_INTERFACES_MANIFEST
 
1581
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
 
1582
        @$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "manifest components/interfaces.manifest"
 
1583
endif
1698
1584
endif
1699
1585
 
1700
1586
endif # NO_GEN_XPT
1739
1625
        $(LOOP_OVER_DIRS)
1740
1626
        $(LOOP_OVER_TOOL_DIRS)
1741
1627
 
1742
 
ifdef MOZ_JAVAXPCOM
1743
 
ifneq ($(XPIDLSRCS),)
1744
 
 
1745
 
JAVA_XPIDLSRCS = $(XPIDLSRCS)
1746
 
 
1747
 
# A single IDL file can contain multiple interfaces, which result in multiple
1748
 
# Java interface files.  So use hidden dependency files.
1749
 
JAVADEPFILES = $(addprefix $(JAVA_GEN_DIR)/.,$(JAVA_XPIDLSRCS:.idl=.java.pp))
1750
 
 
1751
 
$(JAVA_GEN_DIR):
1752
 
        $(NSINSTALL) -D $@
1753
 
GARBAGE_DIRS += $(JAVA_GEN_DIR)
1754
 
 
1755
 
# generate .java files into _javagen/[package name dirs]
1756
 
_JAVA_GEN_DIR = $(JAVA_GEN_DIR)/$(JAVA_IFACES_PKG_NAME)
1757
 
$(_JAVA_GEN_DIR):
1758
 
        $(NSINSTALL) -D $@
1759
 
 
1760
 
$(JAVA_GEN_DIR)/.%.java.pp: %.idl $(XPIDL_COMPILE) $(_JAVA_GEN_DIR)
1761
 
        $(REPORT_BUILD)
1762
 
        $(ELOG) $(XPIDL_COMPILE) -m java -w -I$(srcdir) -I$(IDL_DIR) -o $(_JAVA_GEN_DIR)/$* $(_VPATH_SRCS)
1763
 
        @touch $@
1764
 
 
1765
 
# "Install" generated Java interfaces.  We segregate them based on the XPI_NAME.
1766
 
# If XPI_NAME is not set, install into the "default" directory.
1767
 
ifneq ($(XPI_NAME),)
1768
 
JAVA_INSTALL_DIR = $(JAVA_DIST_DIR)/$(XPI_NAME)
1769
 
else
1770
 
JAVA_INSTALL_DIR = $(JAVA_DIST_DIR)/default
1771
 
endif
1772
 
 
1773
 
$(JAVA_INSTALL_DIR):
1774
 
        $(NSINSTALL) -D $@
1775
 
 
1776
 
export:: $(JAVA_DIST_DIR) $(JAVADEPFILES) $(JAVA_INSTALL_DIR)
1777
 
        (cd $(JAVA_GEN_DIR) && tar $(TAR_CREATE_FLAGS) - .) | (cd $(JAVA_INSTALL_DIR) && tar -xf -)
1778
 
 
1779
 
endif # XPIDLSRCS
1780
 
endif # MOZ_JAVAXPCOM
1781
 
 
1782
1628
################################################################################
1783
1629
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
 
1630
ifneq (,$(filter %.js,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
 
1631
ifeq (,$(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
 
1632
ifndef NO_JS_MANIFEST
 
1633
$(error .js component without matching .manifest. See https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0)
 
1634
endif
 
1635
endif
 
1636
endif
 
1637
 
1784
1638
ifdef EXTRA_COMPONENTS
1785
1639
libs:: $(EXTRA_COMPONENTS)
1786
1640
ifndef NO_DIST_INSTALL
1787
1641
        $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
1788
 
        @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(notdir $^)
1789
1642
endif
1790
1643
 
1791
1644
endif
1800
1653
          dest=$(FINAL_TARGET)/components/$${fname}; \
1801
1654
          $(RM) -f $$dest; \
1802
1655
          $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
1803
 
          $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $$fname; \
1804
1656
        done
1805
1657
endif
 
1658
endif
1806
1659
 
 
1660
EXTRA_MANIFESTS = $(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS))
 
1661
ifneq (,$(EXTRA_MANIFESTS))
 
1662
libs::
 
1663
        $(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest $(patsubst %,"manifest components/%",$(notdir $(EXTRA_MANIFESTS)))
1807
1664
endif
1808
1665
 
1809
1666
################################################################################
1869
1726
$(FINAL_TARGET)/chrome:
1870
1727
        $(NSINSTALL) -D $@
1871
1728
 
 
1729
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
1872
1730
ifneq (,$(wildcard $(JAR_MANIFEST)))
1873
1731
ifndef NO_DIST_INSTALL
1874
 
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
1875
1732
        $(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
1876
1733
          $(QUIET) -j $(FINAL_TARGET)/chrome \
1877
1734
          $(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
1947
1804
endif
1948
1805
 
1949
1806
libs::
1950
 
        $(RM) -rf "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
 
1807
        $(RM) -r "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
1951
1808
        $(NSINSTALL) -D "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
1952
1809
        cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - . | (cd "../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf -)
1953
1810
 
2019
1876
        $(LOOP_OVER_TOOL_DIRS)
2020
1877
 
2021
1878
dependclean:: $(SUBMAKEFILES)
2022
 
        rm -f $(MDDEPFILES)
 
1879
        $(RM) $(MDDEPFILES)
2023
1880
        $(LOOP_OVER_PARALLEL_DIRS)
2024
1881
        $(LOOP_OVER_DIRS)
2025
1882
        $(LOOP_OVER_TOOL_DIRS)
2042
1899
#   it.
2043
1900
 
2044
1901
$(CURDIR)/$(MDDEPDIR):
2045
 
        @if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
 
1902
        $(MKDIR) -p $@
2046
1903
 
2047
1904
ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))
2048
1905
ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS))
2049
1906
MDDEPEND_FILES          := $(strip $(wildcard $(MDDEPDIR)/*.pp))
2050
1907
 
2051
1908
ifneq (,$(MDDEPEND_FILES))
2052
 
ifdef PERL
2053
1909
# The script mddepend.pl checks the dependencies and writes to stdout
2054
1910
# one rule to force out-of-date objects. For example,
2055
1911
#   foo.o boo.o: FORCE
2056
1912
# The script has an advantage over including the *.pp files directly
2057
1913
# because it handles the case when header files are removed from the build.
2058
1914
# 'make' would complain that there is no way to build missing headers.
2059
 
ifeq (,$(MAKE_RESTARTS))
2060
 
$(MDDEPDIR)/.all.pp: FORCE
2061
 
        @$(PERL) $(BUILD_TOOLS)/mddepend.pl $@ $(MDDEPEND_FILES)
2062
 
endif
2063
 
-include $(MDDEPDIR)/.all.pp
2064
 
else
2065
 
include $(MDDEPEND_FILES)
2066
 
endif
 
1915
ALL_PP_RESULTS = $(shell $(PERL) $(BUILD_TOOLS)/mddepend.pl - $(MDDEPEND_FILES))
 
1916
$(eval $(ALL_PP_RESULTS))
2067
1917
endif
2068
1918
 
2069
1919
endif
2074
1924
-include $(MY_RULES)
2075
1925
 
2076
1926
#
2077
 
# This speeds up gmake's processing if these files don't exist.
2078
 
#
2079
 
$(MY_CONFIG) $(MY_RULES):
2080
 
        @touch $@
2081
 
 
2082
 
#
2083
1927
# Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
2084
1928
# or in $(MY_RULES)
2085
1929
#
2149
1993
echo-requires:
2150
1994
        @echo $(REQUIRES)
2151
1995
 
2152
 
echo-requires-recursive::
2153
 
ifdef _REPORT_ALL_DIRS
2154
 
        @echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES)
2155
 
else
2156
 
        @$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))
2157
 
endif
2158
 
        $(LOOP_OVER_PARALLEL_DIRS)
2159
 
        $(LOOP_OVER_DIRS)
2160
 
 
2161
1996
echo-depth-path:
2162
1997
        @$(topsrcdir)/build/unix/print-depth-path.sh
2163
1998
 
2225
2060
        @echo "DLL_SUFFIX         = $(DLL_SUFFIX)"
2226
2061
        @echo "IMPORT_LIB_SUFFIX  = $(IMPORT_LIB_SUFFIX)"
2227
2062
        @echo "INSTALL            = $(INSTALL)"
 
2063
        @echo "VPATH              = $(VPATH)"
2228
2064
 
2229
2065
showhost:
2230
2066
        @echo "HOST_CC            = $(HOST_CC)"
2266
2102
  REQUIRES \
2267
2103
  SHORT_LIBNAME \
2268
2104
  TIERS \
 
2105
  EXTRA_COMPONENTS \
 
2106
  EXTRA_PP_COMPONENTS \
2269
2107
  $(NULL)
2270
2108
 
2271
2109
$(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
2275
2113
 
2276
2114
libs export libs::
2277
2115
        $(CHECK_FROZEN_VARIABLES)
 
2116
 
 
2117
default all::
 
2118
        if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi