2003-05-27 10:49:16 +04:00
|
|
|
# ***** 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.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2003
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
2003-09-29 10:04:02 +04:00
|
|
|
# Brian Ryner <bryner@brianryner.com>
|
2007-06-28 18:28:39 +04:00
|
|
|
# Mark Mentovai <mark@moxienet.com>
|
|
|
|
# Smokey Ardisson <alqahira@ardisson.org>
|
2003-05-27 10:49:16 +04:00
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either 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 *****
|
|
|
|
|
|
|
|
DEPTH = ..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2005-12-02 08:20:36 +03:00
|
|
|
DIRS = \
|
|
|
|
IBPalette \
|
2007-02-21 23:24:55 +03:00
|
|
|
flashblock \
|
2005-12-02 08:20:36 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2005-08-18 17:11:46 +04:00
|
|
|
APP_NAME = Camino
|
|
|
|
|
2007-07-11 07:48:04 +04:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2007-08-29 03:54:19 +04:00
|
|
|
CM_APP_VERSION_FILE = $(srcdir)/config/version.txt
|
|
|
|
CM_APP_VERSION := $(shell cat $(CM_APP_VERSION_FILE))
|
|
|
|
CM_COPYRIGHT_YEAR_FILE = $(srcdir)/config/year.txt
|
|
|
|
CM_COPYRIGHT_YEAR := $(shell cat $(CM_COPYRIGHT_YEAR_FILE))
|
2007-07-11 07:48:04 +04:00
|
|
|
FOX_APP_VERSION_FILE = $(topsrcdir)/browser/config/version.txt
|
2007-07-11 09:38:37 +04:00
|
|
|
FOX_APP_VERSION := $(shell cat $(FOX_APP_VERSION_FILE))
|
2007-07-11 07:48:04 +04:00
|
|
|
PLATFORM_VERSION_FILE = $(topsrcdir)/config/milestone.txt
|
2007-07-11 09:38:37 +04:00
|
|
|
PLATFORM_VERSION := $(shell egrep "^[^\#]+" $(PLATFORM_VERSION_FILE))
|
2007-07-11 07:48:04 +04:00
|
|
|
PLATFORM_BUILD_ID_FILE = generated/platform_build_id
|
2007-07-11 09:38:37 +04:00
|
|
|
PLATFORM_BUILD_ID := $(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid)
|
|
|
|
PLATFORM_INI_FILE = ../toolkit/xre/platform.ini
|
2007-06-28 18:28:39 +04:00
|
|
|
|
2003-05-27 10:49:16 +04:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
BUILDSTYLE = Development
|
|
|
|
else
|
|
|
|
BUILDSTYLE = Deployment
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BUILD_STATIC_LIBS
|
|
|
|
TARGET = CaminoStatic
|
|
|
|
else
|
|
|
|
TARGET = Camino
|
|
|
|
endif
|
|
|
|
|
2007-07-14 10:03:23 +04:00
|
|
|
GARBAGE_DIRS += build \
|
|
|
|
$(DIST)/$(APP_NAME).app \
|
|
|
|
IBPalette/build \
|
|
|
|
embed-replacements.tmp \
|
|
|
|
generated \
|
|
|
|
$(NULL)
|
2004-12-28 22:17:01 +03:00
|
|
|
|
2003-05-27 10:49:16 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2005-06-02 03:56:54 +04:00
|
|
|
unexport CC CXX
|
|
|
|
|
2003-05-27 10:49:16 +04:00
|
|
|
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
2005-05-09 17:48:19 +04:00
|
|
|
|
2003-05-27 10:49:16 +04:00
|
|
|
export::
|
2005-05-09 17:48:19 +04:00
|
|
|
mkdir -p ./wallet/tables && ln -sf $(ABS_topsrcdir)/extensions/wallet/src/*.tbl ./wallet/tables
|
|
|
|
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
2007-07-19 00:52:35 +04:00
|
|
|
rsync -a --exclude .DS_Store --exclude "CVS/" --exclude "*.mode1" --exclude "*.pbxuser" $(srcdir)/Camino.xcodeproj .
|
2003-05-27 10:49:16 +04:00
|
|
|
ln -fs $(srcdir)/src
|
|
|
|
ln -fs $(srcdir)/resources
|
2007-07-19 00:52:35 +04:00
|
|
|
ln -fs $(srcdir)/config
|
2003-05-27 10:49:16 +04:00
|
|
|
ln -fs $(srcdir)/PreferencePanes
|
2005-01-16 23:33:48 +03:00
|
|
|
ln -fs $(srcdir)/Info-*.plist .
|
2003-05-27 10:49:16 +04:00
|
|
|
endif
|
|
|
|
|
2007-06-28 18:28:39 +04:00
|
|
|
generated:
|
|
|
|
mkdir -p $@
|
|
|
|
|
2007-08-29 03:54:19 +04:00
|
|
|
generated/English.lproj: generated
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
# Generate files which need to pull version numbers or dates from other files in the tree
|
|
|
|
generated/all-camino.js: $(srcdir)/resources/application/all-camino.js.in $(FOX_APP_VERSION_FILE) $(CM_APP_VERSION_FILE) generated
|
|
|
|
sed -e "s/%FOX_APP_VERSION%/$(FOX_APP_VERSION)/" \
|
|
|
|
-e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" $< > $@
|
|
|
|
|
|
|
|
generated/Info-Camino.plist: $(srcdir)/Info-Camino.plist.in $(CM_APP_VERSION_FILE) $(CM_COPYRIGHT_YEAR_FILE) generated
|
|
|
|
sed -e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" \
|
|
|
|
-e "s/%CM_COPYRIGHT_YEAR%/$(CM_COPYRIGHT_YEAR)/" $< > $@
|
|
|
|
|
|
|
|
generated/English.lproj/InfoPlist.strings: $(srcdir)/resources/localized/English.lproj/InfoPlist.strings.in $(CM_APP_VERSION_FILE) $(CM_COPYRIGHT_YEAR_FILE) generated/English.lproj
|
|
|
|
sed -e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" \
|
|
|
|
-e "s/%CM_COPYRIGHT_YEAR%/$(CM_COPYRIGHT_YEAR)/" $< | \
|
|
|
|
iconv -f UTF-8 -t UTF-16 > $@
|
2007-07-11 07:48:04 +04:00
|
|
|
|
|
|
|
# This will only touch the build ID file if the build ID has changed. The
|
|
|
|
# file's timestamp will be preserved when the build ID hasn't changed,
|
|
|
|
# reducing unnecessary build activity.
|
|
|
|
$(PLATFORM_BUILD_ID_FILE): FORCE
|
|
|
|
grep -lFx "$(PLATFORM_BUILD_ID)" $@ >& /dev/null || \
|
|
|
|
echo $(PLATFORM_BUILD_ID) > $@
|
|
|
|
|
2007-07-11 09:38:37 +04:00
|
|
|
# Put platform.ini into toolkit/xre and dist/bin, because that's where
|
|
|
|
# Tinderbox looks to figure out the build ID. It currently doesn't need
|
|
|
|
# to be distributed with the application.
|
2007-07-11 07:48:04 +04:00
|
|
|
$(PLATFORM_INI_FILE): $(PLATFORM_BUILD_ID_FILE) $(PLATFORM_VERSION_FILE)
|
2007-07-11 09:38:37 +04:00
|
|
|
mkdir -p `dirname $@`
|
2007-07-11 07:48:04 +04:00
|
|
|
echo [Build] > $@
|
|
|
|
echo BuildID=$(PLATFORM_BUILD_ID) >> $@
|
|
|
|
echo Milestone=$(PLATFORM_VERSION) >> $@
|
2007-07-11 09:38:37 +04:00
|
|
|
$(INSTALL) $@ $(DIST)/bin
|
2007-07-11 07:48:04 +04:00
|
|
|
|
2007-07-14 10:03:23 +04:00
|
|
|
clean clobber::
|
|
|
|
rm -rf $(PLATFORM_INI_FILE) $(DIST)/bin/platform.ini
|
|
|
|
|
2007-08-29 03:54:19 +04:00
|
|
|
generated/CmXULAppData.h: $(srcdir)/src/embedding/CmXULAppData.h.in $(PLATFORM_BUILD_ID_FILE) $(PLATFORM_VERSION_FILE) $(CM_APP_VERSION_FILE)
|
2007-07-11 07:48:04 +04:00
|
|
|
sed -e "s/%PLATFORM_BUILD_ID%/$(PLATFORM_BUILD_ID)/" \
|
2007-08-29 03:54:19 +04:00
|
|
|
-e "s/%PLATFORM_VERSION%/$(PLATFORM_VERSION)/" \
|
|
|
|
-e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" $< > $@
|
2005-08-18 17:11:46 +04:00
|
|
|
|
2006-04-14 05:50:16 +04:00
|
|
|
# The embed-replacements rsync is done for both srcdir and objdir builds
|
|
|
|
# to avoid adding CVS stuff to embed.jar.
|
2007-08-29 03:54:19 +04:00
|
|
|
libs:: generated/all-camino.js generated/Info-Camino.plist generated/English.lproj/InfoPlist.strings generated/CmXULAppData.h $(PLATFORM_INI_FILE)
|
2006-04-14 05:50:16 +04:00
|
|
|
rsync -aC --delete $(srcdir)/embed-replacements/ embed-replacements.tmp
|
|
|
|
cd embed-replacements.tmp && $(ZIP) -r0DX ../../dist/Embed/chrome/embed.jar *
|
2007-07-19 00:52:35 +04:00
|
|
|
$(PBBUILD) -project Camino.xcodeproj -target $(TARGET) -configuration $(BUILDSTYLE) $(PBBUILD_SETTINGS)
|
2003-05-27 10:49:16 +04:00
|
|
|
|
2007-07-14 10:03:23 +04:00
|
|
|
libs::
|
2005-08-18 17:11:46 +04:00
|
|
|
rsync -a --copy-unsafe-links $(XCODE_PRODUCT_DIR)/Camino.app/ $(DIST)/$(APP_NAME).app
|
2006-04-19 18:36:21 +04:00
|
|
|
$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/components/camino.xpt
|
2006-04-19 07:14:43 +04:00
|
|
|
$(XPIDL_LINK) $(DIST)/$(APP_NAME).app/Contents/MacOS/camino.xpt $(DIST)/$(APP_NAME).app/Contents/MacOS/components/*.xpt
|
|
|
|
$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/components/*.xpt
|
|
|
|
mv $(DIST)/$(APP_NAME).app/Contents/MacOS/camino.xpt $(DIST)/$(APP_NAME).app/Contents/MacOS/components/camino.xpt
|
2005-08-18 17:11:46 +04:00
|
|
|
|
2003-05-27 10:49:16 +04:00
|
|
|
# convenience target for PB script build phases
|
|
|
|
echo_srcdir:
|
|
|
|
@echo $(srcdir)
|