summaryrefslogtreecommitdiffstats
path: root/comm/suite/extensions/Makefile.in
blob: 665a0aad41a0aca7ae993ecdd0fe4f6dd1b8c40d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DISTROEXT = $(ABS_DIST)/bin/distribution/extensions

include $(topsrcdir)/config/rules.mk

# If adding extra extensions here, check that EXTRA_ARGS defined below won't
# affect them unintentionally.
EXTENSIONS = \
  $(NULL)

# We are in release mode, we don't want to ship the debug file.
ifndef MOZ_DEBUG
EXTRA_ARGS = -x content/debug.html
endif

DEFINES += \
  -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
  -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
  $(NULL)

define _INSTALL_EXTENSION
$(NSINSTALL) -D $(dir) && \
  $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in -o $(dir)/install.rdf && \
  cd $(dir) && \
  $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
  cd $(abspath $(srcdir)/$(dir)) && \
  $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in $(EXTRA_ARGS)

endef # do not remove the blank line!

libs::
	$(NSINSTALL) -D $(DISTROEXT)
	$(foreach dir,$(EXTENSIONS),$(_INSTALL_EXTENSION))