Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / build / macosx / universal / flight.mk
blob3090e5e2e9886537bdfc1a916ed64c97d1d8a92e
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is the Mozilla Mac OS X Universal Binary Packaging System
16 # The Initial Developer of the Original Code is Google Inc.
17 # Portions created by the Initial Developer are Copyright (C) 2006
18 # the Initial Developer. All Rights Reserved.
20 # Contributor(s):
21 # Mark Mentovai <mark@moxienet.com> (Original Author)
23 # Alternatively, the contents of this file may be used under the terms of
24 # either the GNU General Public License Version 2 or later (the "GPL"), or
25 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 # in which case the provisions of the GPL or the LGPL are applicable instead
27 # of those above. If you wish to allow use of your version of this file only
28 # under the terms of either the GPL or the LGPL, and not to allow others to
29 # use your version of this file under the terms of the MPL, indicate your
30 # decision by deleting the provisions above and replace them with the notice
31 # and other provisions required by the GPL or the LGPL. If you do not delete
32 # the provisions above, a recipient may use your version of this file under
33 # the terms of any one of the MPL, the GPL or the LGPL.
35 # ***** END LICENSE BLOCK *****
37 # BE CAREFUL! This makefile handles a postflight_all rule for a
38 # multi-project build, so DON'T rely on anything that might differ between
39 # the two OBJDIRs.
41 ifndef OBJDIR
42 OBJDIR_PPC = $(MOZ_OBJDIR)/ppc
43 OBJDIR_X86 = $(MOZ_OBJDIR)/i386
44 DIST_PPC = $(OBJDIR_PPC)/dist
45 DIST_X86 = $(OBJDIR_X86)/dist
46 DIST_UNI = $(DIST_PPC)/universal
47 OBJDIR = $(OBJDIR_PPC)
48 endif
50 include $(OBJDIR)/config/autoconf.mk
52 DIST = $(OBJDIR)/dist
54 ifdef MOZ_DEBUG
55 DBGTAG = Debug
56 else
57 DBGTAG =
58 endif
60 ifdef LIBXUL_SDK # {
61 APP_CONTENTS = Contents/Frameworks/XUL.framework
62 else # } {
63 APP_CONTENTS = Contents/MacOS
64 endif # } LIBXUL_SDK
66 ifeq ($(MOZ_BUILD_APP),camino) # {
67 INSTALLER_DIR = camino/installer
68 MOZ_PKG_APPNAME = camino
69 APPNAME = Camino.app
70 BUILDCONFIG_JAR = Contents/MacOS/chrome/embed.jar
71 else # } {
72 MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
73 APPNAME = $(MOZ_APP_DISPLAYNAME)$(DBGTAG).app
74 INSTALLER_DIR = $(MOZ_BUILD_APP)/installer
75 ifeq ($(MOZ_BUILD_APP),xulrunner) # {
76 INSTALLER_DIR = xulrunner/installer/mac
77 APPNAME = XUL.framework
78 APP_CONTENTS = Versions/Current
79 endif # } xulrunner
80 BUILDCONFIG_JAR = $(APP_CONTENTS)/chrome/toolkit.jar
81 endif # } !camino
83 postflight_all:
84 # Build the universal package out of only the bits that would be released.
85 # Call the packager to set this up. Set UNIVERSAL_BINARY= to avoid producing
86 # a universal binary too early, before the unified bits have been staged.
87 # Set SIGN_NSS= to skip shlibsign.
88 $(MAKE) -C $(OBJDIR_PPC)/$(INSTALLER_DIR) \
89 UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
90 $(MAKE) -C $(OBJDIR_X86)/$(INSTALLER_DIR) \
91 UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
92 # Remove .chk files that may have been copied from the NSS build. These will
93 # cause unify to warn or fail if present. New .chk files that are
94 # appropriate for the merged libraries will be generated when the universal
95 # dmg is built.
96 rm -f $(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk \
97 $(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk
98 # The only difference betewen the two trees now should be the
99 # about:buildconfig page. Fix it up.
100 $(TOPSRCDIR)/build/macosx/universal/fix-buildconfig \
101 $(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR) \
102 $(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR)
103 mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
104 rm -f $(DIST_X86)/universal
105 ln -s $(DIST_UNI) $(DIST_X86)/universal
106 rm -rf $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
107 $(TOPSRCDIR)/build/macosx/universal/unify \
108 $(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
109 $(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
110 $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
111 # A universal .dmg can now be produced by making in either architecture's
112 # INSTALLER_DIR.