services/sync/Makefile.in
author Mike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 08:48:56 +0200
changeset 101418 2ef51674316aadfe26a46877b16794f758bf4b6d
parent 99581 b62f77f85ea4b6527743ca4001f6f3e6db36aecd
child 101426 1fc17369c9a6c85dfd5724b9b6ecc073f0b3cc6c
permissions -rw-r--r--
Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted

# 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     := @DEPTH@
topsrcdir := @top_srcdir@
srcdir    := @srcdir@
VPATH     := @srcdir@

include $(DEPTH)/config/autoconf.mk

# Definitions used by constants.js.
weave_version := 1.19.0
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