From 3a53eb687e2f0105027a8d0e4b31d7791eb79627 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 28 Jul 2014 15:24:01 -0400 Subject: [PATCH] Bug 1054476 - move INSTALL_TARGETS in services/ Makefiles to EXTRA_{PP_,}JS_MODULES; r=gps --- services/common/Makefile.in | 24 ------------- services/common/moz.build | 16 +++++++++ services/crypto/Makefile.in | 12 ------- services/crypto/moz.build | 5 +++ services/datareporting/Makefile.in | 11 ------ services/datareporting/moz.build | 5 +++ services/healthreport/Makefile.in | 19 ----------- services/healthreport/moz.build | 10 ++++++ services/metrics/Makefile.in | 14 -------- services/metrics/moz.build | 6 ++++ services/sync/Makefile.in | 54 ------------------------------ services/sync/moz.build | 38 +++++++++++++++++++++ 12 files changed, 80 insertions(+), 134 deletions(-) delete mode 100644 services/crypto/Makefile.in delete mode 100644 services/datareporting/Makefile.in delete mode 100644 services/healthreport/Makefile.in delete mode 100644 services/metrics/Makefile.in diff --git a/services/common/Makefile.in b/services/common/Makefile.in index 9371c244cef..7c1cfa14e86 100644 --- a/services/common/Makefile.in +++ b/services/common/Makefile.in @@ -2,32 +2,8 @@ # 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/. -modules := \ - hawkclient.js \ - hawkrequest.js \ - storageservice.js \ - stringbundle.js \ - tokenserverclient.js \ - utils.js \ - $(NULL) - -pp_modules := \ - async.js \ - bagheeraclient.js \ - observers.js \ - rest.js \ - $(NULL) - PREF_JS_EXPORTS := $(srcdir)/services-common.js -MODULES_FILES := $(modules) -MODULES_DEST = $(FINAL_TARGET)/modules/services-common -INSTALL_TARGETS += MODULES - -PP_JS_MODULES := $(pp_modules) -PP_JS_MODULES_PATH = $(FINAL_TARGET)/modules/services-common -PP_TARGETS += PP_JS_MODULES - include $(topsrcdir)/config/rules.mk # What follows is a helper to launch a standalone storage server instance. diff --git a/services/common/moz.build b/services/common/moz.build index 61d01e6d83c..3f0216e851e 100644 --- a/services/common/moz.build +++ b/services/common/moz.build @@ -10,6 +10,22 @@ EXTRA_COMPONENTS += [ 'servicesComponents.manifest', ] +EXTRA_JS_MODULES['services-common'] += [ + 'hawkclient.js', + 'hawkrequest.js', + 'storageservice.js', + 'stringbundle.js', + 'tokenserverclient.js', + 'utils.js', +] + +EXTRA_PP_JS_MODULES['services-common'] += [ + 'async.js', + 'bagheeraclient.js', + 'observers.js', + 'rest.js', +] + TESTING_JS_MODULES.services.common += [ 'modules-testing/bagheeraserver.js', 'modules-testing/logging.js', diff --git a/services/crypto/Makefile.in b/services/crypto/Makefile.in deleted file mode 100644 index a97069dca66..00000000000 --- a/services/crypto/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -# 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/. - -modules := \ - utils.js \ - WeaveCrypto.js \ - $(NULL) - -CRYPTO_MODULE_FILES := $(addprefix modules/,$(modules)) -CRYPTO_MODULE_DEST = $(FINAL_TARGET)/modules/services-crypto -INSTALL_TARGETS += CRYPTO_MODULE diff --git a/services/crypto/moz.build b/services/crypto/moz.build index b8417ce8e67..7614cc474b5 100644 --- a/services/crypto/moz.build +++ b/services/crypto/moz.build @@ -7,6 +7,11 @@ DIRS += ['component'] TEST_DIRS += ['tests'] +EXTRA_JS_MODULES['services-crypto'] += [ + 'modules/utils.js', + 'modules/WeaveCrypto.js', +] + EXTRA_COMPONENTS += [ 'cryptoComponents.manifest', ] diff --git a/services/datareporting/Makefile.in b/services/datareporting/Makefile.in deleted file mode 100644 index 9c3855c4df6..00000000000 --- a/services/datareporting/Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ -# 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/. - -MODULES := policy.jsm sessions.jsm -MODULES_PATH = $(FINAL_TARGET)/modules/services/datareporting -PP_TARGETS += MODULES - -include $(topsrcdir)/config/rules.mk - -$(FINAL_TARGET)/components/DataReportingService.js: policy.jsm sessions.jsm ../common/observers.js diff --git a/services/datareporting/moz.build b/services/datareporting/moz.build index f0a5e0debb8..114d035e0ec 100644 --- a/services/datareporting/moz.build +++ b/services/datareporting/moz.build @@ -14,6 +14,11 @@ EXTRA_PP_COMPONENTS += [ 'DataReportingService.js', ] +EXTRA_PP_JS_MODULES.services.datareporting += [ + 'policy.jsm', + 'sessions.jsm', +] + TESTING_JS_MODULES.services.datareporting += [ 'modules-testing/mocks.jsm', ] diff --git a/services/healthreport/Makefile.in b/services/healthreport/Makefile.in deleted file mode 100644 index 61b37d764f3..00000000000 --- a/services/healthreport/Makefile.in +++ /dev/null @@ -1,19 +0,0 @@ -# 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/. - -modules := \ - healthreporter.jsm \ - profile.jsm \ - providers.jsm \ - $(NULL) - -MAIN_JS_MODULE := HealthReport.jsm -MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/modules -MAIN_JS_MODULE_FLAGS := $(extra_pp_flags) -PP_TARGETS += MAIN_JS_MODULE - -MODULES := $(modules) -MODULES_PATH = $(FINAL_TARGET)/modules/services/healthreport -MODULES_FLAGS := $(extra_pp_flags) -PP_TARGETS += MODULES diff --git a/services/healthreport/moz.build b/services/healthreport/moz.build index c93ef82a0aa..492d5dc7cdc 100644 --- a/services/healthreport/moz.build +++ b/services/healthreport/moz.build @@ -12,6 +12,16 @@ EXTRA_PP_COMPONENTS += [ 'HealthReportComponents.manifest', ] +EXTRA_PP_JS_MODULES += [ + 'HealthReport.jsm', +] + +EXTRA_PP_JS_MODULES.services.healthreport += [ + 'healthreporter.jsm', + 'profile.jsm', + 'providers.jsm', +] + TESTING_JS_MODULES.services.healthreport += [ 'modules-testing/utils.jsm', ] diff --git a/services/metrics/Makefile.in b/services/metrics/Makefile.in deleted file mode 100644 index 85bced237fc..00000000000 --- a/services/metrics/Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ -# 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/. - -# We install Metrics.jsm into the "main" JSM repository and the rest in -# services. External consumers should only go through Metrics.jsm. -MAIN_JS_MODULE := Metrics.jsm -MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/modules -PP_TARGETS += MAIN_JS_MODULE - -include $(topsrcdir)/config/rules.mk - -# Add extra prerequisites until bug 837792 is addressed. -$(FINAL_TARGET)/modules/Metrics.jsm: Metrics.jsm providermanager.jsm dataprovider.jsm storage.jsm diff --git a/services/metrics/moz.build b/services/metrics/moz.build index c498ad13f74..8965a09b4fb 100644 --- a/services/metrics/moz.build +++ b/services/metrics/moz.build @@ -6,6 +6,12 @@ TEST_DIRS += ['tests'] +# We install Metrics.jsm into the "main" JSM repository and the rest in +# services. External consumers should only go through Metrics.jsm. +EXTRA_PP_JS_MODULES += [ + 'Metrics.jsm', +] + EXTRA_PP_JS_MODULES.services.metrics += [ 'dataprovider.jsm', 'providermanager.jsm', diff --git a/services/sync/Makefile.in b/services/sync/Makefile.in index 4594cf263f1..fd81af5dea3 100644 --- a/services/sync/Makefile.in +++ b/services/sync/Makefile.in @@ -14,58 +14,4 @@ SYNC_PP_FLAGS := \ SYNC_PP_PATH = $(FINAL_TARGET)/modules/services-sync PP_TARGETS += SYNC_PP -# The set of core JavaScript modules for Sync. These are copied as-is. -sync_modules := \ - addonsreconciler.js \ - addonutils.js \ - browserid_identity.js \ - engines.js \ - healthreport.jsm \ - identity.js \ - jpakeclient.js \ - keys.js \ - main.js \ - notifications.js \ - policies.js \ - record.js \ - resource.js \ - rest.js \ - service.js \ - status.js \ - userapi.js \ - util.js \ - $(NULL) - -# The set of JavaScript modules provide engines for Sync. These are -# copied as-is. -sync_engine_modules := \ - addons.js \ - bookmarks.js \ - clients.js \ - forms.js \ - history.js \ - passwords.js \ - prefs.js \ - tabs.js \ - $(NULL) - -sync_stage_modules := \ - cluster.js \ - declined.js \ - enginesync.js \ - $(NULL) - PREF_JS_EXPORTS := $(srcdir)/services-sync.js - -# Install JS module files. -SYNC_MAIN_FILES := $(addprefix modules/,$(sync_modules)) -SYNC_MAIN_DEST = $(FINAL_TARGET)/modules/services-sync -INSTALL_TARGETS += SYNC_MAIN - -SYNC_ENGINES_FILES := $(addprefix modules/engines/,$(sync_engine_modules)) -SYNC_ENGINES_DEST = $(FINAL_TARGET)/modules/services-sync/engines -INSTALL_TARGETS += SYNC_ENGINES - -SYNC_STAGES_FILES := $(addprefix modules/stages/,$(sync_stage_modules)) -SYNC_STAGES_DEST = $(FINAL_TARGET)/modules/services-sync/stages -INSTALL_TARGETS += SYNC_STAGES diff --git a/services/sync/moz.build b/services/sync/moz.build index 8d0e2d96ac5..acd23384f11 100644 --- a/services/sync/moz.build +++ b/services/sync/moz.build @@ -15,6 +15,44 @@ EXTRA_PP_COMPONENTS += [ 'SyncComponents.manifest', ] +EXTRA_JS_MODULES['services-sync'] += [ + 'modules/addonsreconciler.js', + 'modules/addonutils.js', + 'modules/browserid_identity.js', + 'modules/engines.js', + 'modules/healthreport.jsm', + 'modules/identity.js', + 'modules/jpakeclient.js', + 'modules/keys.js', + 'modules/main.js', + 'modules/notifications.js', + 'modules/policies.js', + 'modules/record.js', + 'modules/resource.js', + 'modules/rest.js', + 'modules/service.js', + 'modules/status.js', + 'modules/userapi.js', + 'modules/util.js', +] + +EXTRA_JS_MODULES['services-sync'].engines += [ + 'modules/engines/addons.js', + 'modules/engines/bookmarks.js', + 'modules/engines/clients.js', + 'modules/engines/forms.js', + 'modules/engines/history.js', + 'modules/engines/passwords.js', + 'modules/engines/prefs.js', + 'modules/engines/tabs.js', +] + +EXTRA_JS_MODULES['services-sync'].stages += [ + 'modules/stages/cluster.js', + 'modules/stages/declined.js', + 'modules/stages/enginesync.js', +] + TESTING_JS_MODULES.services.sync += [ 'modules-testing/fakeservices.js', 'modules-testing/fxa_utils.js',