gecko/services/sync/Makefile.in
2012-05-21 12:12:37 +01:00

60 lines
1.6 KiB
Makefile

#
# 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/.
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
# Definitions used by constants.js.
WEAVE_VERSION=$(shell cat $(topsrcdir)/services/sync/version.txt)
WEAVE_CHANNEL=rel
WEAVE_ID={340c2bbc-ce74-4362-90b5-7c26312808ef}
SYNC_PP_DEFINES = \
-Dweave_version=$(WEAVE_VERSION) \
-Dweave_channel=$(WEAVE_CHANNEL) \
-Dweave_id=$(WEAVE_ID)
DIRS = locales
EXTRA_COMPONENTS = \
SyncComponents.manifest \
Weave.js \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/services-sync.js
# Preprocess constants (by preprocessing everything).
# The 'HERE' idiom avoids a dependency on pushd. We need to do this fiddling in
# order to get relative paths, so we can process services/sync/modules/* into
# modules/services-sync/*.
#
# Note that we find candidates, make directories, then 'copy' files.
libs::
ifndef NO_DIST_INSTALL
$(EXIT_ON_ERROR) \
HERE=$(CURDIR); \
cd $(srcdir)/modules; \
dirs=`find * -type d`; \
files=`find * -type f`; \
cd $$HERE; \
for d in $$dirs; do \
$(PYTHON) $(topsrcdir)/config/nsinstall.py -D $(FINAL_TARGET)/modules/services-sync/$$d; \
done; \
for i in $$files; do \
src=$(srcdir)/modules/$$i; \
dest=$(FINAL_TARGET)/modules/services-sync/$$i; \
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(SYNC_PP_DEFINES) $$src > $$dest ; \
done
endif
TEST_DIRS += tests
include $(topsrcdir)/config/rules.mk