bug 475120 - port bug 464154, bug 453840, bug 472431 to comm-central locale Makefiles, r=Standard8

This commit is contained in:
Robert Kaiser 2009-01-29 21:09:40 +01:00
Родитель 36daabe462
Коммит d253b7d698
3 изменённых файлов: 66 добавлений и 54 удалений

Просмотреть файл

@ -71,11 +71,12 @@ APP_VERSION = $(SUNBIRD_VERSION)
DEFINES += -DAPP_VERSION="$(APP_VERSION)"
endif
# ZIP_IN is defaulted to be compatible with the files the wget-en-US target
# pulls. You may override ZIP_IN if you provide your own files. You also _must_
# override ZIP_IN when MOZ_PKG_PRETTYNAMES is defined - the default will not
# These are defaulted to be compatible with the files the wget-en-US target
# pulls. You may override them if you provide your own files. You _must_
# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
# work in that case.
ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
DEFINES += \
-DAB_CD=$(AB_CD) \
@ -148,7 +149,10 @@ endif
$(RM) -r l10n-stage/localized
$(RM) l10n-stage/setup.exe
$(RM) -r l10n-stage/nonlocalized/extensions/calendar-timezones@mozilla.org/chrome
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cp -r $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
$(RM) l10n-stage/localized/install.rdf l10n-stage/localized/chrome.manifest
$(RM) -rf $(DIST)/xpi-stage/calendar-timezones
$(MAKE) -C ../timezones libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
mv $(DIST)/xpi-stage/calendar-timezones/chrome l10n-stage/nonlocalized/extensions/calendar-timezones@mozilla.org
@ -166,7 +170,6 @@ endif
chmod 0755 $(WIN32_INSTALLER_OUT)
ifeq (WINNT,$(OS_ARCH))
repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
else
@ -176,7 +179,7 @@ endif
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
else
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
endif
$(STAGEDIST): AB_CD:=en-US
@ -196,17 +199,6 @@ endif
$(NSINSTALL) -D $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
ifdef MOZ_PKG_PRETTYNAMES
ifneq (,$(filter WINNT Linux,$(OS_ARCH)))
# Linux and Windows unpack to a directory named after the MOZ_APP_NAME
# they were built with. This is fine when when MOZ_PKG_PRETTYNAMES
# isn't defined, because MOZ_PKG_APPNAME will be the same as MOZ_APP_NAME.
# However, when MOZ_PKG_PRETTYNAMES is passed MOZ_PKG_APPNAME inherits
# from MOZ_PKG_DISPLAYNAME, which is not always the same as MOZ_APP_NAME.
cd $(DIST)/l10n-stage && \
mv $(MOZ_APP_NAME) $(MOZ_PKG_APPNAME)
endif
endif
make clobber-zip AB_CD=en-US
clobber-zip:
@ -236,8 +228,10 @@ ifeq (WINNT,$(OS_ARCH))
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
endif
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
cd $(DIST)/xpi-stage/calendar-timezones && \
tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST)/extensions/calendar-timezones@mozilla.org && tar -xf - )
ifneq (en,$(AB))
@ -262,7 +256,6 @@ endif
$(MAKE) clobber-zip AB_CD=$(AB_CD)
mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
@ -345,6 +338,17 @@ endif
# Set the permissions that the folders will have in ftp once uploaded
chmod -vR 775 $(UPLOAD_DIR)
l10n-upload-%: AB_CD=$*
l10n-upload-%:
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
ifdef MOZ_MAKE_COMPLETE_MAR
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR);
endif
ifeq (WINNT, $(OS_ARCH))
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
endif
merge-%:
ifdef LOCALE_MERGEDIR
$(RM) -rf $(LOCALE_MERGEDIR)

Просмотреть файл

@ -61,11 +61,12 @@ SUBMAKEFILES += \
AB = $(firstword $(subst -, ,$(AB_CD)))
# ZIP_IN is defaulted to be compatible with the files the wget-en-US target
# pulls. You may override ZIP_IN if you provide your own files. You also _must_
# override ZIP_IN when MOZ_PKG_PRETTYNAMES is defined - the default will not
# These are defaulted to be compatible with the files the wget-en-US target
# pulls. You may override them if you provide your own files. You _must_
# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
# work in that case.
ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
DEFINES += \
-DAB_CD=$(AB_CD) \
@ -149,7 +150,10 @@ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
$(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
$(RM) -r l10n-stage/localized
$(RM) l10n-stage/setup.exe
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cp -r $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
$(RM) l10n-stage/localized/install.rdf l10n-stage/localized/chrome.manifest
$(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
@ -163,7 +167,6 @@ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
chmod 0755 $(WIN32_INSTALLER_OUT)
ifeq (WINNT,$(OS_ARCH))
repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
else
@ -173,7 +176,7 @@ endif
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
else
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
endif
$(STAGEDIST): AB_CD:=en-US
@ -193,17 +196,6 @@ endif
$(NSINSTALL) -D $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
ifdef MOZ_PKG_PRETTYNAMES
ifneq (,$(filter WINNT Linux,$(OS_ARCH)))
# Linux and Windows unpack to a directory named after the MOZ_APP_NAME
# they were built with. This is fine when when MOZ_PKG_PRETTYNAMES
# isn't defined, because MOZ_PKG_APPNAME will be the same as MOZ_APP_NAME.
# However, when MOZ_PKG_PRETTYNAMES is passed MOZ_PKG_APPNAME inherits
# from MOZ_PKG_DISPLAYNAME, which is not always the same as MOZ_APP_NAME.
cd $(DIST)/l10n-stage && \
mv $(MOZ_APP_NAME) $(MOZ_PKG_APPNAME)
endif
endif
make clobber-zip AB_CD=en-US
clobber-zip:
@ -226,8 +218,10 @@ ifeq (WINNT,$(OS_ARCH))
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
endif
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
ifneq (en,$(AB))
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
@ -252,7 +246,6 @@ endif
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
@ -347,6 +340,17 @@ endif
# Set the permissions that the folders will have in ftp once uploaded
chmod -vR 775 $(UPLOAD_DIR)
l10n-upload-%: AB_CD=$*
l10n-upload-%:
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
ifdef MOZ_MAKE_COMPLETE_MAR
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR);
endif
ifeq (WINNT, $(OS_ARCH))
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
endif
merge-%:
ifdef LOCALE_MERGEDIR
$(RM) -rf $(LOCALE_MERGEDIR)

Просмотреть файл

@ -57,11 +57,12 @@ AB = $(firstword $(subst -, ,$(AB_CD)))
PWD := $(shell pwd)
core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))
# ZIP_IN is defaulted to be compatible with the files the wget-en-US target
# pulls. You may override ZIP_IN if you provide your own files. You also _must_
# override ZIP_IN when MOZ_PKG_PRETTYNAMES is defined - the default will not
# These are defaulted to be compatible with the files the wget-en-US target
# pulls. You may override them if you provide your own files. You _must_
# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
# work in that case.
ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
DEFINES += \
-DAB_CD=$(AB_CD) \
@ -185,7 +186,10 @@ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
$(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
$(RM) -r l10n-stage/localized
$(RM) l10n-stage/setup.exe
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cp -r $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
$(RM) l10n-stage/localized/install.rdf l10n-stage/localized/chrome.manifest
$(MAKE) -C ../../mozilla/extensions/irc/locales repackage-win32-installer-$(AB_CD) STAGEDIST=$(shell pwd)/l10n-stage
$(MAKE) -C ../../mozilla/extensions/venkman/locales repackage-win32-installer-$(AB_CD) STAGEDIST=$(shell pwd)/l10n-stage
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
@ -201,7 +205,6 @@ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
chmod 0755 $(WIN32_INSTALLER_OUT)
ifeq (WINNT,$(OS_ARCH))
repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
else
@ -213,7 +216,7 @@ STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacO
# leave out $(STAGEPATH) as we never have a universal/ subdir here
PKG_DMG_SOURCE = $(MOZ_PKG_APPNAME)
else
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
endif
$(STAGEDIST): AB_CD:=en-US
@ -233,17 +236,6 @@ endif
$(NSINSTALL) -D $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
ifdef MOZ_PKG_PRETTYNAMES
ifneq (,$(filter WINNT Linux,$(OS_ARCH)))
# Linux and Windows unpack to a directory named after the MOZ_APP_NAME
# they were built with. This is fine when when MOZ_PKG_PRETTYNAMES
# isn't defined, because MOZ_PKG_APPNAME will be the same as MOZ_APP_NAME.
# However, when MOZ_PKG_PRETTYNAMES is passed MOZ_PKG_APPNAME inherits
# from MOZ_PKG_DISPLAYNAME, which is not always the same as MOZ_APP_NAME.
cd $(DIST)/l10n-stage && \
mv $(MOZ_APP_NAME) $(MOZ_PKG_APPNAME)
endif
endif
make clobber-zip AB_CD=en-US
clobber-zip:
@ -266,8 +258,10 @@ ifeq (WINNT,$(OS_ARCH))
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
endif
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
$(MAKE) -C ../../mozilla/extensions/irc/locales repackage-zip-$(AB_CD) STAGEDIST=$(STAGEDIST)
$(MAKE) -C ../../mozilla/extensions/venkman/locales repackage-zip-$(AB_CD) STAGEDIST=$(STAGEDIST)
ifneq (en,$(AB))
@ -294,7 +288,6 @@ endif
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
@ -384,6 +377,17 @@ endif
# Set the permissions that the folders will have in ftp once uploaded
chmod -vR 775 $(UPLOAD_DIR)
l10n-upload-%: AB_CD=$*
l10n-upload-%:
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
ifdef MOZ_MAKE_COMPLETE_MAR
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR);
endif
ifeq (WINNT, $(OS_ARCH))
$(PYTHON) $(MOZ_SRCDIR)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
endif
merge-%:
ifdef LOCALE_MERGEDIR
$(RM) -rf $(LOCALE_MERGEDIR)