calendar/lightning/Makefile.in
author Justin Wood <Callek@gmail.com>
Mon, 02 Jan 2012 01:21:21 -0500
changeset 10818 23367078802034b888f2137483a4c356a2c7cb9e
parent 9664 1e24b0d463669d94a2fb5c2140ec8b3c873504da
child 10892 384af8e0eb95537840ef924033dbf148651b417b
permissions -rw-r--r--
Bug 560772 - Make use of mozilla::services for comm-central. r=Standard8 a=Standard8 for CLOSED TREE

# ***** 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 the Oracle Corporation code.
#
# The Initial Developer of the Original Code is Oracle Corporation.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mike Shaver <shaver@off.net>
#   Matthew Willis <lilmatt@mozilla.com>
#   Philipp Kewisch <mozilla@kewis.ch>
#   Dan Mosedale <dmose@mozilla.org>
#
# 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

# Calendar builders currently use STRIP_XPI to reduce the binary component in
# Lightning.

MODULE		= lightning

export XPI_NAME = lightning
export USE_EXTENSION_MANIFEST = 1
XPI_PKGNAME = lightning

XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103}

DIST_FILES = install.rdf application.ini
PREF_JS_EXPORTS = $(srcdir)/content/lightning.js

# Lighting version number
LIGHTNING_VERSION := $(shell cat $(srcdir)/../sunbird/config/version.txt)
THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)

ifneq (,$(findstring pre,$(LIGHTNING_VERSION)))
DEFINES += -DLIGHTNING_PRERELEASE_VERSION=1
endif

# Gecko milestone
GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
ifdef GRE_MILESTONE
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE)
endif

# comm-central source repo and stamp
SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
ifdef SOURCE_STAMP
DEFINES += -DSOURCE_STAMP="$(SOURCE_STAMP)"
endif

SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
ifdef SOURCE_REPO
DEFINES += -DSOURCE_REPO="$(SOURCE_REPO)"
endif

# Mozilla source repo and stamps
MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_SRCDIR) parent --template="{node|short}\n" 2>/dev/null))
ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
endif

MOZ_SOURCE_REPO := $(shell hg -R $(MOZILLA_SRCDIR) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
ifdef MOZ_SOURCE_REPO
DEFINES += -DMOZ_SOURCE_REPO="$(MOZ_SOURCE_REPO)"
endif

# include config.mk here so myconfig or app-config can set DISABLE_LIGHTNING_INSTALL
include $(topsrcdir)/config/config.mk

# installing lightning in a thunderbird build causes problems on tinderboxes
# (see bug 406441 and bug 440017), so we need to provide a hook for the
# tinderboxen to disable that.
ifndef DISABLE_LIGHTNING_INSTALL
ifndef MOZ_SUNBIRD
# install Lightning as a global extension in dist/bin/extensions/
INSTALL_EXTENSION_ID = $(XPI_EM_ID)
endif
endif

DIRS = ../libical \
       ../locales \
       ../base \
       ../providers \
       ../import-export \
       ../itip \
       components \
       locales \
       $(NULL)

ifdef ENABLE_TESTS
DIRS += ../test
endif

# Select a theme from which to pull our skin goodness
# Linux: gnomestripe
# OS X: pinstripe
# Windows: winstripe

ifneq (,$(filter gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
THEME=gnomestripe
else
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
THEME=pinstripe
else
THEME=winstripe
endif
endif

DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
           -DAB_CD=$(AB_CD) \
           -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
           -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
           -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
           -DXPI_EM_ID=$(XPI_EM_ID) \
           -DTHEME=$(THEME) \
           $(NULL)

GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)

# xxx todo: unless our packaging story is revised (bug 406579) we package up timezones.sqlite
libs::
	$(NSINSTALL) -m 0644 $(srcdir)/../timezones/timezones.sqlite $(FINAL_TARGET)

include $(topsrcdir)/config/rules.mk
include $(srcdir)/lightning-packager.mk

ident:
	@printf "comm_revision "
	@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
	    $(FINAL_TARGET)/application.ini App SourceStamp
	@printf "moz_revision "
	@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
	    $(FINAL_TARGET)/application.ini Build SourceStamp
	@printf "buildid "
	@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
	    $(FINAL_TARGET)/application.ini App BuildID

include $(srcdir)/lightning-symbols.mk