calendar/timezones/Makefile.in
author Frank Wein <mcsmurf@mcsmurf.de>
Wed, 14 Nov 2012 00:23:49 +0100
changeset 13556 588b5b98f12c088fef1e2d85f40e184de24ee383
parent 13273 6ce4c3cdaf3c3bace2bd82a9c46543a682fe262f
child 15059 c8c0954ad5947fb552ce84b6cafeac9c8e1f0465
permissions -rw-r--r--
Bug 773761 - Port |Bug 760625 - Use the blocklist to inform click-to-play plugins|, r=Neil, a=Callek

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#
# HOWTO update the timezones.sqlite:
#
# 1. Download latest vzic and Olson database
#    vzic:     <http://code.google.com/p/tzurl/>
#    Olson DB: <ftp://elsie.nci.nih.gov/pub/>
#
#    Modify vzic Makefile to your OLSON_DIR and set *empty* TZID_PREFIX, then
#    then make vzic and execute to produce zoneinfo.
#
# 2. Bump calendar/timezones/config/version.txt
#
# 3. Then, make update=<vzic-dir>/zoneinfo/zones.tab
#
#    a)  This will read both the current (old) timezones.sqlite from
#        mozilla/calendar/timezones/timezones.sqlite and produce a new timezones.sqlite
#    b)  This will read the current timezones.properties and dump out which identifiers
#        are obsolete and which ones are to be added.

DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE = timezones
export USE_EXTENSION_MANIFEST = 1
export XPI_NAME = calendar-timezones
DIST_FILES = install.rdf
XPI_PKGNAME = calendar-timezones

PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
DIRS = locales

ifndef DISABLE_LIGHTNING_INSTALL
# install as a global extension in dist/bin/extensions/
INSTALL_EXTENSION_ID = calendar-timezones@mozilla.org
endif

CALENDAR_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
TIMEZONES_VERSION := $(shell cat $(srcdir)/config/version.txt)

DEFINES += -DAB_CD=$(AB_CD) \
           -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
           -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
           -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
           -DTIMEZONES_VERSION=$(TIMEZONES_VERSION) \
           $(NULL)

TIMEZONES_SQLITE =  $(srcdir)/timezones.sqlite

ifneq ($(strip $(update)),)
libs::
	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones_before_update.dump
	$(DIST)/bin/run-mozilla.sh $(LIBXUL_DIST)/bin/xpcshell -s -w $(srcdir)/update.js $(update) $(srcdir)/$(DEPTH) $(TIMEZONES_VERSION)
	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones.dump
endif

libs::
	$(NSINSTALL) -m 0644 $(TIMEZONES_SQLITE) $(FINAL_TARGET)

libs-%:
	$(MAKE) -C locales libs AB_CD=$* XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1

include $(topsrcdir)/config/rules.mk