Bug 459402 - fix sunbird l10n builds. r=gozer
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -105,30 +105,17 @@ DEFINES += -DTHUNDERBIRD_VERSION=$(THUND
-DLIGHTNING_FIREFOX=$(LIGHTNING_FIREFOX) \
-DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
-DTHEME=$(THEME) \
$(NULL)
GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
-# Get all directories in /l10n/*, that contain a calendar subdir.
-calendar_locales := $(subst /calendar,,$(subst $(topsrcdir)/../l10n/,,$(wildcard $(topsrcdir)/../l10n/*/calendar)))
-# Now make sure those dirs are in shipped-locales
-shipped_locales :=$(shell cat $(topsrcdir)/calendar/locales/shipped-locales)
-locales_to_build :=$(foreach locale,$(calendar_locales),$(if $(filter $(locale),$(shipped_locales)),$(locale)))
-
-ifneq ($(strip $(locales_to_build)),)
-# The l10n directory is checked out and contains supported locales, start building our locales
-
-libs:: $(addprefix libs-,$(locales_to_build))
libs-%:
- @echo - locales to build -- $(locales_to_build)
$(MAKE) -C locales libs AB_CD=$* XPI_NAME=lightning USE_EXTENSION_MANIFEST=1 NO_JAR_AUTO_REG=1
$(MAKE) -C ../locales libs AB_CD=$* XPI_NAME=lightning USE_EXTENSION_MANIFEST=1 NO_JAR_AUTO_REG=1
-endif
-
# xxx todo: unless our packaging story is revised (bug 406579) we package up timezones.sqlite
libs::
$(NSINSTALL) $(srcdir)/../timezones/timezones.sqlite $(FINAL_TARGET)
include $(topsrcdir)/config/rules.mk
--- a/calendar/locales/Makefile.in
+++ b/calendar/locales/Makefile.in
@@ -86,17 +86,19 @@ endif
ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
DEFINES += -DEXTENSION_PREF
endif
include $(topsrcdir)/config/rules.mk
libs-%:
@$(MAKE) -C ../../mozilla/toolkit/locales libs-$*
+ifdef MOZ_SUNBIRD
@$(MAKE) -C ../sunbird/locales libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
+endif
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
ifdef MOZ_BRANDING_DIRECTORY
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
@@ -122,17 +124,17 @@ endif
mkdir l10n-stage
$(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
$(RM) -r l10n-stage/localized
$(RM) l10n-stage/setup.exe
$(RM) -r l10n-stage/nonlocalized/extensions/calendar-timezones@mozilla.org/chrome
$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD)
$(RM) -rf $(DIST)/xpi-stage/calendar-timezones
$(MAKE) libs-$(AB_CD)
- $(MAKE) -C ../timezones libs
+ $(MAKE) -C ../timezones libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
mv $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
mv $(DIST)/xpi-stage/calendar-timezones/chrome l10n-stage/nonlocalized/extensions/calendar-timezones@mozilla.org
mv $(DIST)/xpi-stage/calendar-timezones/chrome.manifest l10n-stage/nonlocalized/extensions/calendar-timezones@mozilla.org
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
cp ../installer/windows/l10ngen/setup.exe l10n-stage
$(NSINSTALL) -D l10n-stage/localized/uninstall
cp ../installer/windows/l10ngen/uninst.exe l10n-stage/localized/uninstall
rm -f app.7z
@@ -159,26 +161,28 @@ repackage-zip: $(ZIP_IN)
$(RM) -r $(DIST)/l10n-stage
mkdir $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
$(RM) $(STAGEDIST)/chrome/en-US.jar \
$(STAGEDIST)/chrome/en-US.manifest \
$(STAGEDIST)/chrome/calendar-en-US.jar \
$(STAGEDIST)/chrome/calendar-en-US.manifest \
+ $(STAGEDIST)/chrome/sunbird-en-US.jar \
+ $(STAGEDIST)/chrome/sunbird-en-US.manifest \
$(STAGEDIST)/defaults/pref/sunbird-l10n.js
$(RM) -rf $(STAGEDIST)/extensions/calendar-timezones@mozilla.org/chrome
$(RM) $(STAGEDIST)/extensions/calendar-timezones@mozilla.org/chrome.manifest
$(RM) -r $(STAGEDIST)/defaults/profile \
$(STAGEDIST)/chrome/en-US \
$(STAGEDIST)/chrome/calendar-en-US
$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD)
$(RM) -rf $(DIST)/xpi-stage/calendar-timezones
$(MAKE) libs-$(AB_CD)
- $(MAKE) -C ../timezones libs
+ $(MAKE) -C ../timezones libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
ifeq (WINNT,$(OS_ARCH))
$(RM) -r $(STAGEDIST)/uninstall
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/uninst.exe $(STAGEDIST)/uninstall
endif
$(RM) -r $(DIST)/xpi-stage/locale-$(AB_CD)/chrome/$(AB_CD)
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
@@ -200,19 +204,23 @@ repackage-zip-%: $(ZIP_IN)
langpack-%: LANGPACK_FILE=$(_ABS_DIST)/install/sunbird-$(MOZ_APP_VERSION).$(AB_CD).langpack.xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%:
@echo "Making langpack $(LANGPACK_FILE)"
$(NSINSTALL) -D $(DIST)/install
@$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD)
@$(MAKE) libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
+ @$(MAKE) -C ../timezones/locales libs AB_CD=$* XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1
$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf
+ cd $(DIST)/xpi-stage/calendar-timezones/chrome && \
+ tar $(TAR_CREATE_FLAGS) - * | ( cd $(_ABS_DIST)/xpi-stage/locale-$(AB_CD)/chrome && tar -xf - )
+ cat $(DIST)/xpi-stage/calendar-timezones/chrome.manifest >> $(_ABS_DIST)/xpi-stage/locale-$(AB_CD)/chrome.manifest
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
- $(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest
+ $(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest extensions
# This is a generic target that will make a langpack, repack ZIP (+tarball)
# builds, and repack an installer if applicable. It is called from the
# tinderbox scripts. Alter it with caution.
#
# Note: the last target called here should be repackage-zip-$* as the l10n build
# systems rely on dist/l10n-stage/<product> to be in place in order to package
# the complete MAR files.
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -53,26 +53,12 @@ CALENDAR_VERSION := $(shell cat $(topsrc
DEFINES += -DAB_CD=$(AB_CD) \
-DCALENDAR_VERSION=$(CALENDAR_VERSION) \
-DCOMM_BUILD=$(COMM_BUILD) \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
DIRS = components locales public
-# Get all directories in /l10n/*, that contain a
-# calendar/chrome/calendar/providers/gdata subdir.
-calendar_locales := $(subst /calendar/chrome/calendar/providers/gdata,,$(subst $(topsrcdir)/../l10n/,,$(wildcard $(topsrcdir)/../l10n/*/calendar/chrome/calendar/providers/gdata)))
-# Now make sure those dirs are in shipped-locales
-shipped_locales :=$(shell cat $(topsrcdir)/calendar/locales/shipped-locales)
-locales_to_build :=$(foreach locale,$(calendar_locales),$(if $(filter $(locale),$(shipped_locales)),$(locale)))
-
-ifneq ($(strip $(locales_to_build)),)
-# The l10n directory is checked out and contains supported locales, start building our locales
-
-libs:: $(addprefix libs-,$(locales_to_build))
libs-%:
- @echo - gdata locales to build -- $(locales_to_build)
$(MAKE) -C locales libs AB_CD=$* XPI_NAME=$(XPI_NAME) USE_EXTENSION_MANIFEST=1
-endif
-
include $(topsrcdir)/config/rules.mk
--- a/calendar/sunbird/locales/Makefile.in
+++ b/calendar/sunbird/locales/Makefile.in
@@ -75,16 +75,19 @@ endif
ifdef MOZ_UPDATER
libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
ifeq ($(OS_ARCH),WINNT)
cat $< $(srcdir)/updater_append.ini | \
sed -e "s/%AB_CD%/$(AB_CD)/" | \
iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) > $(FINAL_TARGET)/updater.ini
else
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ if test ! -d $(FINAL_TARGET)/updater.app/Contents/MacOS; then \
+ mkdir -p $(FINAL_TARGET)/updater.app/Contents/MacOS; \
+ fi
cat $< $(srcdir)/updater_append.ini | \
sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.app/Contents/MacOS/updater.ini
else
cat $< $(srcdir)/updater_append.ini | \
sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
endif
endif
endif
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -62,21 +62,19 @@ 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
STRIP_XPI = 1
PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
-ifeq ($(AB_CD),)
DIRS = locales
-endif
-ifdef MOZ_SUNBIRD
+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)
TIMEZONES_VERSION := $(shell cat $(srcdir)/config/version.txt)
DEFINES += -DAB_CD=$(AB_CD) \
@@ -92,27 +90,12 @@ libs::
echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones_before_update.dump
$(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) $(TIMEZONES_SQLITE) $(FINAL_TARGET)
-# Get all directories in /l10n/*, that contain a calendar subdir.
-calendar_locales := $(subst /calendar,,$(subst $(topsrcdir)/../l10n/,,$(wildcard $(topsrcdir)/../l10n/*/calendar)))
-# Now make sure those dirs are in shipped-locales
-shipped_locales :=$(shell cat $(topsrcdir)/calendar/locales/shipped-locales)
-locales_to_build :=$(foreach locale,$(calendar_locales),$(if $(filter $(locale),$(shipped_locales)),$(locale)))
-
-ifneq ($(strip $(locales_to_build)),)
-# The l10n directory is checked out and contains supported locales, start building our locales
-
-libs:: $(addprefix libs-,$(locales_to_build))
- $(MAKE) -C locales libs AB_CD=en-US XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1 NO_JAR_AUTO_REG=1
-
libs-%:
- @echo - locales to build -- $(locales_to_build)
$(MAKE) -C locales libs AB_CD=$* XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1 NO_JAR_AUTO_REG=1
-endif
-
include $(topsrcdir)/config/rules.mk