Bug 1197054 - Build changes to get rid of bookmarks.inc.r=nalexander
authorAllison Naaktgeboren <ally@mozilla.com>
Tue, 01 Sep 2015 15:52:26 -0700
changeset 260405 26b367ff0033d5730f4cd66930a3866eb3c89994
parent 260404 5183c511ce583ee0ea00a6e057b2fa092a871290
child 260406 9f7bb8e84057d25ee2e669c4be7b3c4538d9386c
push id29310
push usercbook@mozilla.com
push dateWed, 02 Sep 2015 11:34:07 +0000
treeherdermozilla-central@fb805e859b4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1197054
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1197054 - Build changes to get rid of bookmarks.inc.r=nalexander
mobile/android/base/locales/Makefile.in
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/strings.xml.in
mobile/locales/Makefile.in
mobile/locales/en-US/profile/bookmarks.inc
mobile/locales/generic/profile/bookmarks.json.in
--- a/mobile/android/base/locales/Makefile.in
+++ b/mobile/android/base/locales/Makefile.in
@@ -39,53 +39,39 @@ libs realchrome:: \
 chrome-%:: AB_CD=$*
 chrome-%::
 	@$(MAKE) \
 	  $(dir-res-values)-$(AB_rCD)/strings.xml \
 	  $(dir-res-raw)-$(AB_rCD)/suggestedsites.json \
 	  $(dir-res-raw)-$(AB_rCD)/browsersearch.json \
 	  AB_CD=$*
 
-# setup the path to bookmarks.inc. copied and tweaked version of MERGE_FILE from config/config.mk
-MOBILE_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/mobile/locales/en-US,$(or $(realpath $(L10NBASEDIR)),$(abspath $(L10NBASEDIR)))/$(AB_CD)/mobile)
-
-ifdef LOCALE_MERGEDIR
-BOOKMARKSPATH = $(firstword \
-  $(wildcard $(LOCALE_MERGEDIR)/mobile/profile/bookmarks.inc ) \
-  $(wildcard $(MOBILE_LOCALE_SRCDIR)/profile/bookmarks.inc ) \
-  $(topsrcdir)/mobile/locales/en-US/profile/bookmarks.inc )
-else
-BOOKMARKSPATH = $(abspath $(MOBILE_LOCALE_SRCDIR)/profile/bookmarks.inc)
-endif
-
 # Determine the ../res/values[-*]/ path
 strings-xml-bypath  = $(filter %/strings.xml,$(MAKECMDGOALS))
 ifeq (,$(strip $(strings-xml-bypath)))
   strings-xml-bypath = $(strings-xml)
 endif
 dir-strings-xml = $(patsubst %/,%,$(dir $(strings-xml-bypath)))
 
 strings-xml-preqs =\
   $(strings-xml-in) \
   $(BRANDPATH) \
   $(STRINGSPATH) \
   $(SEARCHSTRINGSPATH) \
   $(SYNCSTRINGSPATH) \
-  $(BOOKMARKSPATH) \
   $(if $(IS_LANGUAGE_REPACK),FORCE) \
   $(NULL)
 
 $(if $(MOZ_ANDROID_SHARED_ACCOUNT_TYPE),,$(error Missing MOZ_ANDROID_SHARED_ACCOUNT_TYPE))
 $(if $(MOZ_ANDROID_SHARED_FXACCOUNT_TYPE),,$(error Missing MOZ_ANDROID_SHARED_FXACCOUNT_TYPE))
 
 $(dir-strings-xml)/strings.xml: $(strings-xml-preqs)
 	$(call py_action,preprocessor, \
       $(DEFINES) \
 	  -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME) \
-	  -DBOOKMARKSPATH='$(BOOKMARKSPATH)' \
 	  -DBRANDPATH='$(BRANDPATH)' \
 	  -DMOZ_ANDROID_SHARED_ACCOUNT_TYPE=$(MOZ_ANDROID_SHARED_ACCOUNT_TYPE) \
 	  -DMOZ_ANDROID_SHARED_FXACCOUNT_TYPE=$(MOZ_ANDROID_SHARED_FXACCOUNT_TYPE) \
 	  -DMOZ_APP_DISPLAYNAME='@MOZ_APP_DISPLAYNAME@' \
 	  -DSTRINGSPATH='$(STRINGSPATH)' \
 	  -DSYNCSTRINGSPATH='$(SYNCSTRINGSPATH)' \
 	  -DSEARCHSTRINGSPATH='$(SEARCHSTRINGSPATH)' \
       $< \
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -698,8 +698,23 @@ just addresses the organization to follo
 <!ENTITY restriction_disallow_customize_home_title2 "Disable Home customization">
 <!ENTITY restriction_disallow_private_browsing_title2 "Disable Private Browsing">
 <!ENTITY restriction_disallow_location_services_title2 "Disable Location Services">
 <!ENTITY restriction_disallow_display_settings_title2 "Disable Display settings">
 <!ENTITY restriction_disallow_clear_history_title2 "Disable \'Clear browsing history\'">
 <!ENTITY restriction_disallow_master_password_title2 "Disable master password">
 <!ENTITY restriction_disallow_guest_browsing_title2 "Disable Guest Browsing">
 
+<!-- Default Bookmarks titles-->
+<!-- LOCALIZATION NOTE (bookmarks_title): title for the folder that will contains the default bookmarks -->
+<!ENTITY bookmarks_title "Mobile">
+<!-- LOCALIZATION NOTE (bookmarks_about_browser): link title for about:fennec -->
+<!ENTITY bookmarks_about_browser "Firefox: About your browser">
+<!-- LOCALIZATION NOTE (bookmarks_addons): link title for https://addons.mozilla.org/en-US/mobile -->
+<!ENTITY bookmarks_addons "Firefox: Customize with add-ons">
+<!-- LOCALIZATION NOTE (bookmarks_support): link title for https://support.mozilla.org/ -->
+<!ENTITY bookmarks_support "Firefox: Support">
+<! --LOCALIZATION NOTE (bookmarks_marketplace):link title for https://marketplace.firefox.com -->
+<!ENTITY bookmarks_marketplace "Firefox Marketplace">
+<!-- LOCALIZATION NOTE (bookmarks_restricted_support): link title for https://support.mozilla.org/kb/kids -->
+<!ENTITY bookmarks_restricted_support "Firefox Help and Support for a simplified kid-friendly version of Firefox">
+<!-- LOCALIZATION NOTE (bookmarks_restricted_webmaker):link title for https://webmaker.org -->
+<!ENTITY bookmarks_restricted_webmaker "Learn the Web: Mozilla Webmaker">
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -14,17 +14,16 @@
 <!ENTITY formatI "&#037;I">
 <!ENTITY formatS "&#037;s">
 <!ENTITY formatS1 "&#037;1&#036;s">
 <!ENTITY formatS2 "&#037;2&#036;s">
 <!ENTITY formatS3 "&#037;3&#036;s">
 <!ENTITY formatD "&#037;d">
 ]>
 
-#includesubst @BOOKMARKSPATH@
 <resources>
   <string name="moz_app_displayname">@MOZ_APP_DISPLAYNAME@</string>
   <string name="android_package_name">@ANDROID_PACKAGE_NAME@</string>
   <string name="content_authority_db_browser">@ANDROID_PACKAGE_NAME@.db.browser</string>
   <string name="content_authority_db_formhistory">@ANDROID_PACKAGE_NAME@.db.formhistory</string>
   <string name="content_authority_db_passwords">@ANDROID_PACKAGE_NAME@.db.passwords</string>
   <string name="content_authority_db_tabs">@ANDROID_PACKAGE_NAME@.db.tabs</string>
   <string name="content_authority_db_readinglist">@ANDROID_PACKAGE_NAME@.db.readinglist</string>
@@ -448,35 +447,35 @@
 
   <string name="filepicker_title">&filepicker_title;</string>
   <string name="filepicker_audio_title">&filepicker_audio_title;</string>
   <string name="filepicker_image_title">&filepicker_image_title;</string>
   <string name="filepicker_video_title">&filepicker_video_title;</string>
 
   <!-- Default bookmarks. We used to use bookmark titles shared with XUL from mobile's
        profile/bookmarks.inc (see bug 964946). Don't expose the URLs to L10N. -->
-  <string name="bookmarkdefaults_title_aboutfirefox">@bookmarks_aboutBrowser@</string>
+  <string name="bookmarkdefaults_title_aboutfirefox">&bookmarks_about_browser;</string>
   <string name="bookmarkdefaults_url_aboutfirefox">about:firefox</string>
 
   <!-- Icon is automatically generated from R.drawable.bookmarkdefaults_favicon_addons -->
-  <string name="bookmarkdefaults_title_addons">@bookmarks_addons@</string>
+  <string name="bookmarkdefaults_title_addons">&bookmarks_addons;</string>
   <string name="bookmarkdefaults_url_addons">https://addons.mozilla.org/android/</string>
 
   <!-- Icon is automatically generated from R.drawable.bookmarkdefaults_favicon_support -->
-  <string name="bookmarkdefaults_title_support">@bookmarks_support@</string>
+  <string name="bookmarkdefaults_title_support">&bookmarks_support;</string>
   <string name="bookmarkdefaults_url_support">https://support.mozilla.org/products/mobile</string>
 
   <!-- Icon is automatically generated from R.drawable.bookmarkdefaults_favicon_marketplace -->
-  <string name="bookmarkdefaults_title_marketplace">@bookmarks_marketplace@</string>
+  <string name="bookmarkdefaults_title_marketplace">&bookmarks_marketplace;</string>
   <string name="bookmarkdefaults_url_marketplace">https://marketplace.firefox.com/</string>
 
-  <string name="bookmarkdefaults_title_restricted_webmaker">@bookmarks_restricted_webmaker@</string>
+  <string name="bookmarkdefaults_title_restricted_webmaker">&bookmarks_restricted_webmaker;</string>
   <string name="bookmarkdefaults_url_restricted_webmaker">https://webmaker.org/</string>
 
-  <string name="bookmarkdefaults_title_restricted_support">@bookmarks_restricted_support@</string>
+  <string name="bookmarkdefaults_title_restricted_support">&bookmarks_restricted_support;</string>
   <string name="bookmarkdefaults_url_restricted_support">https://support.mozilla.org/kb/kids</string>
 
   <!-- Site identity popup -->
   <string name="identity_connection_secure">&identity_connection_secure;</string>
   <string name="identity_connection_insecure">&identity_connection_insecure;</string>
 
   <string name="mixed_content_blocked_all">&mixed_content_blocked_all1;</string>
   <string name="mixed_content_blocked_some">&mixed_content_blocked_some1;</string>
--- a/mobile/locales/Makefile.in
+++ b/mobile/locales/Makefile.in
@@ -39,27 +39,16 @@ SUBMAKEFILES += \
 ###########################################################################
 # Default target, preserve existing functionality for:
 #    gmake -C $obj/mobile/locales
 ###########################################################################
 search-jar-default: search-jar
 
 
 ###########################################################################
-bookmarks     = bookmarks.json
-bookmarks-ts  = $(tgt-gendir)/$(bookmarks)
-src-bookmarks = $(srcdir)/generic/profile/$(bookmarks).in
-
-GARBAGE += $(bookmarks) $(bookmarks-ts)
-# ---------------------------------------------------------------------------
-# Note: Always symlink bookmarks.json to pickup the current build for a
-#       locale.  Phase 2 edits should remove the common/symlink file and
-#       provide a user function able to derive the path.
-###########################################################################
-
 ## Searchlist plugin config
 plugin-file-array = \
   $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
   $(srcdir)/en-US/searchplugins/list.txt \
   $(NULL)
 
 ###########################################################################
 plugin_file    = $(firstword $(plugin-file-array))
@@ -139,58 +128,23 @@ include $(topsrcdir)/config/rules.mk
 libs-preqs =\
   $(call mkdir-deps,$(DIST)/install) \
   $(NULL)
 
 libs-%: $(libs-preqs)
 	$(display-deps)
 	@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$*
 	@$(MAKE) -C $(DEPTH)/intl/locales AB_CD=$* XPI_NAME=locale-$*
-	@$(MAKE) -B $(bookmarks) AB_CD=$*
 	@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 
 # Tailored target to just add the chrome processing for multi-locale builds
 chrome-%:
 	$(display-deps)
-	@$(MAKE) -B $(bookmarks) AB_CD=$*
 	@$(MAKE) -B searchplugins AB_CD=$*
 	@$(MAKE) chrome AB_CD=$*
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$*
 
 NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
 
 
-# emulate vpath to gather deps with a path
-has-mergedir = $(if $(strip $(LOCALE_MERGEDIR)),1)
-bookmarks-inc-array = \
-  $(wildcard \
-    $(if $(has_mergedir),$(LOCALE_MERGEDIR)/mobile/profile/bookmarks.inc) \
-    $(LOCALE_SRCDIR)/profile/bookmarks.inc \
-    $(if $(has-mergedir),$(srcdir)/en-US/profile/bookmarks.inc) \
-  )
-bookmarks-inc = $(firstword $(bookmarks-inc-array))
-
-bookmarks-preqs = \
-  $(bookmarks-inc) \
-  $(src-bookmarks) \
-  generic/profile/$(bookmarks).in \
-  $(if $(IS_LANGUAGE_REPACK),FORCE) \
-  $(GLOBAL_DEPS) \
-  $(NULL)
-
-$(bookmarks-ts): $(bookmarks-preqs)
-	$(display_deps)
-	$(call py_action,preprocessor, \
-      -I $< \
-      -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
-      $(src-bookmarks) \
-      -o $@)
-
-.PHONY: bookmarks $(bookmarks)
-bookmarks: $(bookmarks)
-$(bookmarks): $(bookmarks-ts)
-	@echo '\nGenerating: $@'
-	ln -fn $< .
-
-
-export:: searchplugins bookmarks
+export:: searchplugins
deleted file mode 100644
--- a/mobile/locales/en-US/profile/bookmarks.inc
+++ /dev/null
@@ -1,41 +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/.
-#filter emptyLines
-
-# LOCALIZATION NOTE: The 'en-US' strings in the URLs will be replaced with
-# your locale code, and link to your translated pages as soon as they're 
-# live.
-
-# LOCALIZATION NOTE: Some of these URLs are currently 404s, but should be coming
-# online shortly.
-
-# LOCALIZATION NOTE (bookmarks_title):
-# title for the folder that will contains the default bookmarks
-#define bookmarks_title Mobile
-
-# LOCALIZATION NOTE (bookmarks_aboutBrowser):
-# link title for about:fennec
-#define bookmarks_aboutBrowser Firefox: About your browser
-
-# LOCALIZATION NOTE (bookmarks_addons):
-# link title for https://addons.mozilla.org/en-US/mobile
-#define bookmarks_addons Firefox: Customize with add-ons
-
-# LOCALIZATION NOTE (bookmarks_support):
-# link title for https://support.mozilla.org/
-#define bookmarks_support Firefox: Support
-
-# LOCALIZATION NOTE (bookmarks_marketplace):
-# link title for https://marketplace.firefox.com
-#define bookmarks_marketplace Firefox Marketplace
-
-# LOCALIZATION NOTE (bookmarks_restricted_support):
-# link title for https://support.mozilla.org/kb/kids
-#define bookmarks_restricted_support Firefox Help and Support for a simplified kid-friendly version of Firefox
-
-# LOCALIZATION NOTE (bookmarks_restricted_webmaker):
-# link title for https://webmaker.org
-#define bookmarks_restricted_webmaker Learn the Web: Mozilla Webmaker
-
-#unfilter emptyLines
deleted file mode 100644
--- a/mobile/locales/generic/profile/bookmarks.json.in
+++ /dev/null
@@ -1,8 +0,0 @@
-#filter substitution
-{"type":"text/x-moz-place-container","root":"placesRoot","children":
-  [{"type":"text/x-moz-place-container","title":"@bookmarks_title@","annos":[{"name":"mobile/bookmarksRoot","expires":4,"type":1,"value":1}],
-# Bug 921433: this is empty, because bookmarks are now added via resource 
-# strings: see LocalBrowserDB.addDefaultBookmarks.
-    "children": []
-  }]
-}