2012-05-21 04:12:37 -07: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-21 17:05:08 -07:00
|
|
|
|
2012-07-17 10:45:13 -07:00
|
|
|
DEPTH := ../..
|
|
|
|
topsrcdir := @top_srcdir@
|
|
|
|
srcdir := @srcdir@
|
|
|
|
VPATH := @srcdir@
|
2010-06-21 17:05:08 -07:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2011-02-04 12:29:53 -08:00
|
|
|
# Definitions used by constants.js.
|
2012-07-17 10:45:13 -07:00
|
|
|
weave_version := 1.19.0
|
|
|
|
weave_channel := rel
|
|
|
|
weave_id := {340c2bbc-ce74-4362-90b5-7c26312808ef}
|
2011-02-04 12:29:53 -08:00
|
|
|
|
2012-07-17 10:45:13 -07:00
|
|
|
sync_pp_defines := \
|
|
|
|
-Dweave_version=$(weave_version) \
|
|
|
|
-Dweave_channel=$(weave_channel) \
|
|
|
|
-Dweave_id=$(weave_id)
|
2011-02-04 12:29:53 -08:00
|
|
|
|
2012-07-17 10:45:13 -07:00
|
|
|
DIRS := locales
|
2010-06-21 17:05:08 -07:00
|
|
|
|
2012-07-17 10:45:13 -07:00
|
|
|
EXTRA_COMPONENTS := \
|
2010-07-01 12:08:13 -07:00
|
|
|
SyncComponents.manifest \
|
2010-06-21 17:05:08 -07:00
|
|
|
Weave.js \
|
|
|
|
$(NULL)
|
|
|
|
|
2012-07-17 10:45:13 -07:00
|
|
|
PREF_JS_EXPORTS := $(srcdir)/services-sync.js
|
2010-06-21 17:05:08 -07:00
|
|
|
|
2011-02-04 12:29:53 -08: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-21 17:05:08 -07:00
|
|
|
libs::
|
2011-02-04 12:29:53 -08:00
|
|
|
ifndef NO_DIST_INSTALL
|
|
|
|
$(EXIT_ON_ERROR) \
|
|
|
|
HERE=$(CURDIR); \
|
|
|
|
cd $(srcdir)/modules; \
|
2011-02-28 17:29:51 -08:00
|
|
|
dirs=`find * -type d`; \
|
|
|
|
files=`find * -type f`; \
|
2011-02-04 12:29:53 -08: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; \
|
2012-07-17 10:45:13 -07:00
|
|
|
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(sync_pp_defines) $$src > $$dest ; \
|
2011-02-04 12:29:53 -08:00
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
2010-06-21 17:05:08 -07:00
|
|
|
|
2012-02-04 09:32:24 -08:00
|
|
|
TEST_DIRS += tests
|
2010-06-21 17:05:08 -07:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|