Bug 822017 - Use less bad build rules in browser/app/profile/extensions; r=ted

This commit is contained in:
Mike Hommey 2012-12-30 12:14:23 +01:00
Родитель b7d6a27dce
Коммит 34659c1b6e
2 изменённых файлов: 29 добавлений и 19 удалений

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

@ -16,24 +16,37 @@ DIRS = \
{972ce4c6-7e08-4474-a285-3208198ce6fd} \
$(NULL)
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/config/config.mk
ifneq (,$(filter aurora beta,$(MOZ_UPDATE_CHANNEL)))
EXTENSIONS = \
testpilot@labs.mozilla.com \
$(NULL)
define _INSTALL_EXTENSION
$(NSINSTALL) -D $(dir) && \
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in > $(dir)/install.rdf && \
cd $(dir) && \
$(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
cd $(call core_abspath,$(srcdir)/$(dir)) && \
$(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in
all_xpis = $(foreach dir,$(EXTENSIONS),$(DISTROEXT)/$(dir).xpi)
libs:: $(all_xpis)
GARBAGE += $(all_xpis)
endef # do not remove the blank line!
$(all_xpis): $(DISTROEXT)/%.xpi: $(call mkdir_deps,$(DISTROEXT)) libs-%
cd $* && \
$(ZIP) -r9XD $@ * -x \*.in -x \*.mkdir.done
cd $(call core_abspath,$(srcdir)/$*) && \
$(ZIP) -r9XD $@ * -x \*.in -x \*.mkdir.done
.PHONY: $(all_xpis:.xpi=)
define pp_one
$(2) := $(2)
$(2)_PATH := $(dir $(2))
$(2)_TARGET := libs-$(1)
PP_TARGETS += $(2)
endef
$(foreach d,$(EXTENSIONS), \
$(foreach in,$(shell cd $(srcdir) ; find $(d) -name '*.in'), \
$(eval $(call pp_one,$(d),$(in))) \
) \
)
libs::
$(NSINSTALL) -D $(DISTROEXT)
$(foreach dir,$(EXTENSIONS),$(_INSTALL_EXTENSION))
endif
include $(topsrcdir)/config/rules.mk

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

@ -9,14 +9,11 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
FILES := \
install.rdf \
install.rdf.in \
$(NULL)
FILES_PATH = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
PP_TARGETS := FILES
libs::
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf
$(INSTALL) $(FILES) $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
GARBAGE += $(FILES)
include $(topsrcdir)/config/rules.mk