diff --git a/locales/Makefile.in b/locales/Makefile.in --- a/locales/Makefile.in +++ b/locales/Makefile.in @@ -26,42 +26,46 @@ XPI_PKGNAME = chatzilla-$(CHA # include config.mk before we override the AB_CD var it sets include $(topsrcdir)/config/config.mk # if the wanted language is not in all-locales, fall back to en-US ifeq (,$(filter $(AB_CD),$(shell cat $(srcdir)/all-locales))) override AB_CD = en-US endif -DEFINES += -DAB_CD=$(AB_CD) \ - -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \ - -DFIREFOX_MAXVERSION=$(FIREFOX_MAXVERSION) \ - $(NULL) - ifneq (en-US,$(AB_CD)) XPI_NAME = chatzilla-$(AB_CD) INSTALL_EXTENSION_ID = langpack-$(AB_CD)@chatzilla.mozilla.org XPI_PKGNAME = chatzilla-$(CHATZILLA_VERSION).$(AB_CD) -DIST_FILES = generic/install.rdf -XULPPFLAGS += \ - -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc \ - -I$(LOCALE_SRCDIR)/defines.inc \ - $(NULL) endif -DEFINES += -DINSTALL_EXTENSION_ID="$(INSTALL_EXTENSION_ID)" -DEFINES += -DCHATZILLA_VERSION=$(CHATZILLA_VERSION) -DEFINES += -DCHATZILLA_BASE_VERSION=$(CHATZILLA_BASE_VERSION) +DEFINES += -DAB_CD=$(AB_CD) \ + -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \ + -DFIREFOX_MAXVERSION=$(FIREFOX_MAXVERSION) \ + -DINSTALL_EXTENSION_ID="$(INSTALL_EXTENSION_ID)" \ + -DCHATZILLA_VERSION=$(CHATZILLA_VERSION) \ + -DCHATZILLA_BASE_VERSION=$(CHATZILLA_BASE_VERSION) \ + $(NULL) + +APP_DEFINES = $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \ + $(srcdir)/en-US/defines.inc) + +TK_DEFINES = $(firstword \ + $(wildcard $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc) \ + $(MOZILLA_DIR)/toolkit/locales/en-US/defines.inc) include $(topsrcdir)/config/rules.mk ifneq (en-US,$(AB_CD)) libs realchrome:: @echo "Comparing $(AB_CD) to en-US" @$(PERL) $(topsrcdir)/toolkit/locales/compare-locales.pl $(srcdir)/en-US $(LOCALE_SRCDIR) + $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \ + -DTK_DEFINES=$(TK_DEFINES) -DAPP_DEFINES=$(APP_DEFINES) \ + $(srcdir)/generic/install.rdf -o $(DIST)/xpi-stage/$(XPI_NAME)/install.rdf) endif libs-%: AB_CD=$* libs-%: # XXX: it would be nice if we could just do nothing if no langpack is being done # currently, we just go and (re)build en-US if called with a non-supported locale $(MAKE) libs AB_CD=$* diff --git a/locales/generic/install.rdf b/locales/generic/install.rdf --- a/locales/generic/install.rdf +++ b/locales/generic/install.rdf @@ -1,15 +1,20 @@ #filter substitution +#ifndef IRC_STANDALONE_BUILD +#include @TK_DEFINES@ +#include @APP_DEFINES@ +#endif +