~ubuntu-branches/ubuntu/natty/lightning-extension/natty-updates

« back to all changes in this revision

Viewing changes to mozilla/config/rules.mk

  • Committer: Package Import Robot
  • Author(s): Chris Coulson, Chris Coulson, Ben Collins
  • Date: 2012-07-16 14:19:14 UTC
  • mfrom: (3.1.3 natty-security)
  • Revision ID: package-import@ubuntu.com-20120716141914-12y5um8oa26nvh8t
Tags: 1.6+build1-0ubuntu0.11.04.2
* New upstream stable release (CALENDAR_1_6_BUILD1) (LP: #1024564)

[ Chris Coulson <chris.coulson@canonical.com> ]
* Fix LP: #995054 - Ensure the /usr/lib/thunderbird/extensions symlink
  exists on upgrade, which may not be the case when upgrading from a really
  old lightning version
  - add debian/lightning-extension.postinst

[ Ben Collins <bcollins@ubuntu.com> ]
* Fix LP: #1025387 - FTBFS: powerpc build fails
  - add debian/patches/fix-dtoa-build-on-ppc.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- makefile -*-
2
2
# vim:set ts=8 sw=8 sts=8 noet:
3
3
#
4
 
# ***** BEGIN LICENSE BLOCK *****
5
 
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
6
 
#
7
 
# The contents of this file are subject to the Mozilla Public License Version
8
 
# 1.1 (the "License"); you may not use this file except in compliance with
9
 
# the License. You may obtain a copy of the License at
10
 
# http://www.mozilla.org/MPL/
11
 
#
12
 
# Software distributed under the License is distributed on an "AS IS" basis,
13
 
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14
 
# for the specific language governing rights and limitations under the
15
 
# License.
16
 
#
17
 
# The Original Code is mozilla.org code.
18
 
#
19
 
# The Initial Developer of the Original Code is
20
 
# Netscape Communications Corporation.
21
 
# Portions created by the Initial Developer are Copyright (C) 1998
22
 
# the Initial Developer. All Rights Reserved.
23
 
#
24
 
# Contributor(s):
25
 
#  Chase Phillips <chase@mozilla.org>
26
 
#  Benjamin Smedberg <benjamin@smedbergs.us>
27
 
#  Jeff Walden <jwalden+code@mit.edu>
28
 
#  Joey Armstrong <joey@mozilla.com>
29
 
#
30
 
# Alternatively, the contents of this file may be used under the terms of
31
 
# either of the GNU General Public License Version 2 or later (the "GPL"),
32
 
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
33
 
# in which case the provisions of the GPL or the LGPL are applicable instead
34
 
# of those above. If you wish to allow use of your version of this file only
35
 
# under the terms of either the GPL or the LGPL, and not to allow others to
36
 
# use your version of this file under the terms of the MPL, indicate your
37
 
# decision by deleting the provisions above and replace them with the notice
38
 
# and other provisions required by the GPL or the LGPL. If you do not delete
39
 
# the provisions above, a recipient may use your version of this file under
40
 
# the terms of any one of the MPL, the GPL or the LGPL.
41
 
#
42
 
# ***** END LICENSE BLOCK *****
 
4
# This Source Code Form is subject to the terms of the Mozilla Public
 
5
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
 
6
# You can obtain one at http://mozilla.org/MPL/2.0/.
 
7
#
43
8
 
44
9
ifndef topsrcdir
45
10
$(error topsrcdir was not set))
57
22
include $(topsrcdir)/config/version.mk
58
23
endif
59
24
 
 
25
include $(topsrcdir)/config/makefiles/makeutils.mk
 
26
include $(topsrcdir)/config/makefiles/autotargets.mk
 
27
 
60
28
ifdef SDK_XPIDLSRCS
61
29
XPIDLSRCS += $(SDK_XPIDLSRCS)
62
30
endif
512
480
# A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
513
481
# variables we know to check can just set NEED_MDDEPDIR explicitly.
514
482
ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS)$(NEED_MDDEPDIR))
515
 
MAKE_DIRS               += $(CURDIR)/$(MDDEPDIR)
516
 
GARBAGE_DIRS            += $(MDDEPDIR)
 
483
MAKE_DIRS       += $(CURDIR)/$(MDDEPDIR)
 
484
GARBAGE_DIRS    += $(CURDIR)/$(MDDEPDIR)
517
485
endif
518
486
 
519
487
#
778
746
endif
779
747
 
780
748
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
781
 
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)))))
782
 
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_GLUE_PROGRAM_LDFLAGS))))
783
 
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
 
749
ifneq (,$(strip $(filter %.$(LIB_SUFFIX),$(LIBS) $(EXTRA_DSO_LDOPTS)) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LIBS)))
 
750
$(MDDEPDIR)/libs: Makefile.in
 
751
        @mkdir -p $(MDDEPDIR)
 
752
        @$(EXPAND_LIBS_DEPS) LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(LIBS)) , \
 
753
                             SHARED_LIBRARY_LIBS_DEPS = $(SHARED_LIBRARY_LIBS) , \
 
754
                             DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)) > $@
 
755
 
 
756
ifneq (,$(wildcard $(MDDEPDIR)/libs))
 
757
include $(MDDEPDIR)/libs
 
758
endif
 
759
 
 
760
$(MDDEPDIR)/libs: $(wildcard $(filter %.$(LIBS_DESC_SUFFIX),$(LIBS_DEPS) $(SHARED_LIBRARY_LIBS_DEPS) $(DSO_LDOPTS_DEPS)))
 
761
 
 
762
EXTRA_DEPS += $(MDDEPDIR)/libs
 
763
endif
 
764
 
784
765
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
785
 
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
786
766
 
787
767
# Dependencies which, if modified, should cause everything to rebuild
788
768
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
901
881
        touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
902
882
endif
903
883
else # !WINNT || GNU_CC
904
 
ifeq ($(CPP_PROG_LINK),1)
905
884
        $(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
906
885
        @$(call CHECK_STDCXX,$@)
907
 
else # ! CPP_PROG_LINK
908
 
        $(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
909
 
endif # CPP_PROG_LINK
910
886
endif # WINNT && !GNU_CC
911
887
 
912
888
ifdef ENABLE_STRIP
959
935
        fi
960
936
endif   # MSVC with manifest tool
961
937
else
962
 
ifeq ($(CPP_PROG_LINK),1)
963
938
        $(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
964
939
        @$(call CHECK_STDCXX,$@)
965
 
else
966
 
        $(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
967
 
endif # CPP_PROG_LINK
968
940
endif # WINNT && !GNU_CC
969
941
 
970
942
ifdef ENABLE_STRIP
1143
1115
 
1144
1116
endif # MOZ_AUTO_DEPS
1145
1117
 
 
1118
$(OBJS) $(HOST_OBJS): $(GLOBAL_DEPS)
 
1119
 
1146
1120
# Rules for building native targets must come first because of the host_ prefix
1147
 
host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
 
1121
host_%.$(OBJ_SUFFIX): %.c
1148
1122
        $(REPORT_BUILD)
1149
1123
        $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1150
1124
 
1151
 
host_%.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
1152
 
        $(REPORT_BUILD)
1153
 
        $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1154
 
 
1155
 
host_%.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
1156
 
        $(REPORT_BUILD)
1157
 
        $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1158
 
 
1159
 
host_%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
 
1125
host_%.$(OBJ_SUFFIX): %.cpp
 
1126
        $(REPORT_BUILD)
 
1127
        $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
 
1128
 
 
1129
host_%.$(OBJ_SUFFIX): %.cc
 
1130
        $(REPORT_BUILD)
 
1131
        $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
 
1132
 
 
1133
host_%.$(OBJ_SUFFIX): %.m
1160
1134
        $(REPORT_BUILD)
1161
1135
        $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1162
1136
 
1163
 
host_%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
 
1137
host_%.$(OBJ_SUFFIX): %.mm
1164
1138
        $(REPORT_BUILD)
1165
1139
        $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1166
1140
 
1169
1143
        @$(MAKE_DEPS_AUTO_CC)
1170
1144
        $(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
1171
1145
 
1172
 
%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
 
1146
%.$(OBJ_SUFFIX): %.c
1173
1147
        $(REPORT_BUILD)
1174
1148
        @$(MAKE_DEPS_AUTO_CC)
1175
1149
        $(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
1177
1151
# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
1178
1152
# 'moc' only knows about #defines it gets on the command line (-D...), not in
1179
1153
# included headers like mozilla-config.h
1180
 
moc_%.cpp: %.h $(GLOBAL_DEPS)
 
1154
moc_%.cpp: %.h
1181
1155
        $(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@
1182
1156
 
1183
 
moc_%.cc: %.cc $(GLOBAL_DEPS)
 
1157
moc_%.cc: %.cc
1184
1158
        $(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $(_VPATH_SRCS:.cc=.h) $(OUTOPTION)$@
1185
1159
 
1186
 
qrc_%.cpp: %.qrc $(GLOBAL_DEPS)
 
1160
qrc_%.cpp: %.qrc
1187
1161
        $(ELOG) $(RCC) -name $* $< $(OUTOPTION)$@
1188
1162
 
1189
1163
ifdef ASFILES
1190
1164
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1191
1165
# a '-c' flag.
1192
 
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) $(GLOBAL_DEPS)
 
1166
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX)
1193
1167
        $(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
1194
1168
endif
1195
1169
 
1196
 
%.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)
 
1170
%.$(OBJ_SUFFIX): %.S
1197
1171
        $(AS) -o $@ $(ASFLAGS) -c $<
1198
1172
 
1199
1173
%:: %.cpp $(GLOBAL_DEPS)
1203
1177
#
1204
1178
# Please keep the next two rules in sync.
1205
1179
#
1206
 
%.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
 
1180
%.$(OBJ_SUFFIX): %.cc
1207
1181
        $(REPORT_BUILD)
1208
1182
        @$(MAKE_DEPS_AUTO_CXX)
1209
1183
        $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
1210
1184
 
1211
 
%.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
 
1185
%.$(OBJ_SUFFIX): %.cpp
1212
1186
        $(REPORT_BUILD)
1213
1187
        @$(MAKE_DEPS_AUTO_CXX)
1214
1188
ifdef STRICT_CPLUSPLUS_SUFFIX
1219
1193
        $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
1220
1194
endif #STRICT_CPLUSPLUS_SUFFIX
1221
1195
 
1222
 
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
 
1196
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm
1223
1197
        $(REPORT_BUILD)
1224
1198
        @$(MAKE_DEPS_AUTO_CXX)
1225
1199
        $(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS)
1226
1200
 
1227
 
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
 
1201
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m
1228
1202
        $(REPORT_BUILD)
1229
1203
        @$(MAKE_DEPS_AUTO_CC)
1230
1204
        $(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(_VPATH_SRCS)
1397
1371
ifdef GRE_MODULE
1398
1372
PREF_DIR = greprefs
1399
1373
else
1400
 
ifneq (,$(XPI_NAME)$(LIBXUL_SDK))
 
1374
ifneq (,$(XPI_NAME)$(LIBXUL_SDK)$(MOZ_PHOENIX))
1401
1375
PREF_DIR = defaults/preferences
1402
1376
else
1403
1377
PREF_DIR = defaults/pref
1461
1435
 
1462
1436
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(DIST)/include;
1463
1437
# warn against overriding existing .h file.
1464
 
$(XPIDL_GEN_DIR)/.done:
1465
 
        $(MKDIR) -p $(XPIDL_GEN_DIR)
1466
 
        @$(TOUCH) $@
1467
 
 
1468
 
# don't depend on $(XPIDL_GEN_DIR), because the modification date changes
1469
 
# with any addition to the directory, regenerating all .h files -> everything.
1470
1438
 
1471
1439
XPIDL_DEPS = \
1472
1440
  $(topsrcdir)/xpcom/idl-parser/header.py \
1474
1442
  $(topsrcdir)/xpcom/idl-parser/xpidl.py \
1475
1443
  $(NULL)
1476
1444
 
1477
 
$(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
 
1445
xpidl-preqs = \
 
1446
  $(call mkdir_deps,$(XPIDL_GEN_DIR)) \
 
1447
  $(call mkdir_deps,$(MDDEPDIR)) \
 
1448
  $(NULL)
 
1449
 
 
1450
$(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
1478
1451
        $(REPORT_BUILD)
1479
1452
        $(PYTHON_PATH) \
1480
 
          -I$(topsrcdir)/other-licenses/ply \
 
1453
          $(PLY_INCLUDE) \
1481
1454
          -I$(topsrcdir)/xpcom/idl-parser \
1482
1455
          $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
1483
1456
        @if test -n "$(findstring $*.h, $(EXPORTS))"; \
1486
1459
ifndef NO_GEN_XPT
1487
1460
# generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
1488
1461
# into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
1489
 
$(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
 
1462
$(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
1490
1463
        $(REPORT_BUILD)
1491
1464
        $(PYTHON_PATH) \
1492
 
          -I$(topsrcdir)/other-licenses/ply \
 
1465
          $(PLY_INCLUDE) \
1493
1466
          -I$(topsrcdir)/xpcom/idl-parser \
1494
1467
          -I$(topsrcdir)/xpcom/typelib/xpt/tools \
1495
1468
          $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
2028
2001
CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
2029
2002
  $(if $(subst $($(var)_FROZEN),,'$($(var))'),$(error Makefile variable '$(var)' changed value after including rules.mk. Was $($(var)_FROZEN), now $($(var)).)))
2030
2003
 
2031
 
libs export libs::
 
2004
libs export::
2032
2005
        $(CHECK_FROZEN_VARIABLES)
2033
2006
 
2034
2007
default all::
2035
2008
        if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi
 
2009
 
 
2010
 
 
2011
#############################################################################
 
2012
# Derived targets and dependencies
 
2013
 
 
2014
include $(topsrcdir)/config/makefiles/autotargets.mk
 
2015
ifneq ($(NULL),$(AUTO_DEPS))
 
2016
  default all libs tools export:: $(AUTO_DEPS)
 
2017
endif
 
2018