2010-06-22 04:05:08 +04:00
|
|
|
#
|
2012-05-21 15:12:37 +04:00
|
|
|
# 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/.
|
2010-06-22 04:05:08 +04:00
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2011-02-04 23:29:53 +03:00
|
|
|
# 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)
|
|
|
|
|
2010-06-22 04:05:08 +04:00
|
|
|
DIRS = locales
|
|
|
|
|
|
|
|
EXTRA_COMPONENTS = \
|
2010-07-01 23:08:13 +04:00
|
|
|
SyncComponents.manifest \
|
2010-06-22 04:05:08 +04:00
|
|
|
Weave.js \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
PREF_JS_EXPORTS = $(srcdir)/services-sync.js
|
|
|
|
|
2011-02-04 23:29:53 +03:00
|
|
|
# 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.
|
2010-06-22 04:05:08 +04:00
|
|
|
libs::
|
2011-02-04 23:29:53 +03:00
|
|
|
ifndef NO_DIST_INSTALL
|
|
|
|
$(EXIT_ON_ERROR) \
|
|
|
|
HERE=$(CURDIR); \
|
|
|
|
cd $(srcdir)/modules; \
|
2011-03-01 04:29:51 +03:00
|
|
|
dirs=`find * -type d`; \
|
|
|
|
files=`find * -type f`; \
|
2011-02-04 23:29:53 +03:00
|
|
|
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
|
|
|
|
|
2010-06-22 04:05:08 +04:00
|
|
|
|
2012-02-04 21:32:24 +04:00
|
|
|
TEST_DIRS += tests
|
2010-06-22 04:05:08 +04:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|