gecko-dev/browser/locales/Makefile.in

156 строки
5.9 KiB
Makefile
Исходник Обычный вид История

# ***** 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 Mozilla Browser code.
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <bsmedberg@covad.net>
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# 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
# This makefile uses target-specific variable assignments to override
# the AB_CD variable when making non-default language JARs and XPIs
# below. If you don't understand what this means, talk to bsmedberg
# before altering this makefile.
AB_CD = $(MOZ_UI_LOCALE)
APP_VERSION := $(shell cat $(srcdir)/../config/version.txt)
DEFINES += -DAB_CD=$(AB_CD) -DAPP_VERSION=$(MOZ_APP_VERSION)
ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
DEFINES += -DEXTENSION_PREF
endif
PREF_JS_EXPORTS = $(srcdir)/$(AB_CD)/firefox-l10n.js
include $(topsrcdir)/config/rules.mk
README_FILES = \
README.txt \
$(NULL)
PROFILE_FILES = \
bookmarks.html \
localstore.rdf \
search.rdf \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
PROFILE_FILES += win/mimeTypes.rdf
else
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
PROFILE_FILES += mac/mimeTypes.rdf
else
PROFILE_FILES += unix/mimeTypes.rdf
endif
endif
PROFILE_CHROME = userChrome-example.css userContent-example.css
libs:: $(addprefix $(AB_CD)/,$(README_FILES))
$(INSTALL) $^ $(DIST)/bin
libs realchrome:: $(addprefix $(AB_CD)/profile/,$(PROFILE_FILES))
$(INSTALL) $^ $(DIST)/bin/defaults/profile
libs realchrome:: $(addprefix $(AB_CD)/profile/chrome/,$(PROFILE_CHROME))
$(INSTALL) $^ $(DIST)/bin/defaults/profile/chrome
install:: $(addprefix $(AB_CD)/profile/,$(PROFILE_FILES))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
install:: $(addprefix $(AB_CD)/profile/chrome/,$(PROFILE_CHROME))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/chrome
SEARCH_PLUGINS = $(shell cat $(srcdir)/$(AB_CD)/searchplugins/list.txt)
SEARCH_PLUGIN_PREFIX = $(addprefix $(srcdir)/$(AB_CD)/searchplugins/,$(SEARCH_PLUGINS))
libs realchrome:: $(addsuffix .src,$(SEARCH_PLUGIN_PREFIX)) $(foreach base,$(SEARCH_PLUGIN_PREFIX),$(wildcard $(base).gif)$(wildcard $(base).png))
$(INSTALL) $^ $(DIST)/bin/searchplugins
install:: $(addsuffix .src,$(SEARCH_PLUGIN_PREFIX)) $(foreach base,$(SEARCH_PLUGIN_PREFIX),$(wildcard $(base).gif)$(wildcard $(base).png))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
# Let's imagine we wanted to create a language JARfile without registering it
# the following targets only work with JARed chrome: flat chrome is not supported
jar-%: AB_CD = $*
xpi-%: AB_CD = $*
jar-%: %
@$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-I$(srcdir)/$*/defines.inc $(srcdir)/jar.mn | \
$(PERL) -I$(topsrcdir)/config $(topsrcdir)/config/make-jars.pl \
$(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \
$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(_NO_FLOCK) \
-f jar -d $(DIST)/bin/chrome -s $(srcdir) -t $(topsrcdir) -z $(ZIP) \
-p $(topsrcdir)/config/preprocessor.pl -- \
"$(DEFINES) $(ACDEFINES)"
xpi-%: %
@$(MAKE) -C ../../toolkit/locales jar-$*
@$(MAKE) jar-$*
@$(RM) -rf $(DIST)/install/xpi-$*
@$(INSTALL) $(DIST)/bin/chrome/$*.jar $(DIST)/install/xpi-$*/chrome
@$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(topsrcdir)/toolkit/locales/$*/defines.inc -I$(srcdir)/$*/defines.inc $(srcdir)/generic/install.rdf > $(DIST)/install/xpi-$*/install.rdf
@cd $(DIST)/install/xpi-$*; $(ZIP) -r9D ../firefox-$(MOZ_APP_VERSION).$*.langpack.xpi install.rdf chrome
clean-l10n:
@$(RM) $(DIST)/bin/defaults/pref/firefox-l10n.js
@$(RM) -r $(DIST)/bin/searchplugins
@find $(DIST)/bin/chrome -name "??-??.jar" -o -name "???-??.jar" -o -name "??-???.jar" -o -name "??-??" -o -name "???-??" -o -name "??-???" | xargs $(RM) -r dummy
@$(PERL) -pi -e '$$_ = "" if m~^locale,install,url,jar:resource:/chrome/[a-z]{2,3}-[A-Z]{2,3}\.jar~' $(DIST)/bin/chrome/installed-chrome.txt
installers-%: % clean-l10n
@$(MAKE) -C ../../toolkit/locales AB_CD=$*
@$(MAKE) AB_CD=$* # build/register the chrome
ifdef MOZ_USE_OFFICIAL_BRANDING
@$(MAKE) -C ../../other-licenses/branding/firefox/content locale AB_CD=$*
else
@$(MAKE) -C ../base locale AB_CD=$*
endif
@$(MAKE) xpi-$* # build the langpack
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
@$(MAKE) -C ../app repackage AB_CD=$*
endif
@$(MAKE) -C ../installer AB_CD=$* # build the tarball/ZIP
@$(MAKE) -C ../installer installer AB_CD=$* # build the installer
.PHONY: clean-l10n