# HG changeset patch
# User Nick Alexander <nalexander@mozilla.com>
# Date 1527186527 25200
# Node ID 0f0e532db5ecc823a013c5f417d54694d6f38284
# Parent  40d9ab3a11e4790dc5e1e56e78d6ade7320d4eca
Bug 1464128 - Migrate bookmarks.html.in to LOCALIZED_GENERATED_FILES. r=ted.mielczarek

This one looks to be pretty straight-forward.  It irritates me that
the jar.mn entry doesn't explicitly say that the result is coming from
the object directory, like

locale/browser/bookmarks.html (!bookmarks.html)

but that's for another day.

MozReview-Commit-ID: Cw8E0VJhSxv

diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -64,18 +64,16 @@ DIST_SUBDIRS = $(DIST_SUBDIR)
 include $(topsrcdir)/config/rules.mk
 
 include $(topsrcdir)/toolkit/locales/l10n.mk
 
 $(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
 	$(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
 searchplugins:: $(list-json)
 
-DEFINES += -DBOOKMARKS_INCLUDE_DIR=$(dir $(call MERGE_FILE,profile/bookmarks.inc))
-
 libs-%: AB_CD=$*
 libs-%:
 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../../toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
 ifneq (,$(wildcard ../extensions/formautofill/locales))
diff --git a/browser/locales/generate_bookmarks.py b/browser/locales/generate_bookmarks.py
new file mode 100644
--- /dev/null
+++ b/browser/locales/generate_bookmarks.py
@@ -0,0 +1,42 @@
+# 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/.
+
+# Generate bookmarks.html by interpolating the included (localized)
+# `bookmarks.inc` file into the given (unlocalized) `bookmarks.html.in` input.
+
+from __future__ import absolute_import, unicode_literals, print_function
+
+import buildconfig
+import sys
+
+from mozbuild import preprocessor
+
+
+def main(output, bookmarks_html_in, bookmarks_inc, locale=None):
+    if not locale:
+        raise ValueError('locale must be specified!')
+
+    CONFIG = buildconfig.substs
+
+    # Based on
+    # https://dxr.mozilla.org/l10n-central/search?q=path%3Abookmarks.inc+%23if&redirect=true,
+    # no localized input uses the preprocessor conditional #if (really,
+    # anything but #define), so it's safe to restrict the set of defines to
+    # what's used in mozilla-central directly.
+    defines = {}
+    defines['AB_CD'] = locale
+    if defines['AB_CD'] == 'ja-JP-mac':
+        defines['AB_CD'] = 'ja'
+
+    defines['NIGHTLY_BUILD'] = CONFIG['NIGHTLY_BUILD']
+    defines['BOOKMARKS_INCLUDE_PATH'] = bookmarks_inc
+
+    includes = preprocessor.preprocess(includes=[bookmarks_html_in],
+                                       defines=defines,
+                                       output=output)
+    return includes
+
+
+if __name__ == "__main__":
+    main(sys.argv[1:])
diff --git a/browser/locales/generic/profile/bookmarks.html.in b/browser/locales/generic/profile/bookmarks.html.in
--- a/browser/locales/generic/profile/bookmarks.html.in
+++ b/browser/locales/generic/profile/bookmarks.html.in
@@ -1,14 +1,10 @@
 #filter substitution
-#include @BOOKMARKS_INCLUDE_DIR@/bookmarks.inc
-#define ja_jp_mac ja-JP-mac
-#if AB_CD == ja_jp_mac
-#define AB_CD ja
-#endif
+#include @BOOKMARKS_INCLUDE_PATH@
 
 #define mozilla_icon data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E %3Cpath d='M0 0h16v16H0z'/%3E %3Cpath d='M13.994 10.356H15V12h-3.171V7.741c0-1.308-.435-1.81-1.29-1.81-1.04 0-1.46.737-1.46 1.8v2.63h1.006V12H6.918V7.741c0-1.308-.435-1.81-1.291-1.81-1.039 0-1.459.737-1.459 1.8v2.63h1.441V12H1v-1.644h1.006V6.079H1V4.435h3.168v1.139a2.507 2.507 0 0 1 2.3-1.29A2.452 2.452 0 0 1 8.931 5.91 2.535 2.535 0 0 1 11.4 4.284 2.448 2.448 0 0 1 14 6.9v3.458z' fill='%23fff'/%3E %3C/svg%3E
 
 #define nightly_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA01JREFUeNpkk01oXFUUx//vzp33ZiaTzkwnyUwmsbbNRpp0GhuVKiVgQIUiLmoX7lyIG10I6qIUrG6KGyuYZbMwiATqxipSMVhQYwWhiwSJwUxKkzbz8ZJ5H/M+7/vunUIE7Vnc1f3/zjn/c46wsCbjIOI4Rlfew+Zf6/h9+RYYYzj70hymZp7GULUCSin+H8IBwLYsfLOwiOfffndK1c2LmhO84jl+2e5ZCTN6Xer0fpp5dmq+frxy5zGAY9n49IOLuHDls8uqE3y07YV0ywwQGA6oZsJRFRT0FnK2Hpw8PTl/7tXZDw8ApF/29YUvufjqxxqLPrnLQBUiQRUI4EcQHQ+EgwbjENl8Pv3H9W/f//m7W9cOAKkXzr+J4pm5umy6S/uEkiAEOlzscWHG5jTbhcsrDJiHsN1CIScJTlc5JaSlldEna9uk8fcGHNO6tOMGqfssQjNFoHOxyAXU9xF5HiRXw2AqhuUEsLs6giCkjbXG549a+O3mMhQneLnthOh0NBiaAdozkTEdpC0Hnm2hKAKR3ESJRigNFZBHCF2zn+p7SMIwRM9kRcI/D5g2xAcd1PQeMtw8xkGuafIRGRgZKfHfCbKlIu5t3IVASYYDDtMzL85il2fLuh6qIkFkWtjrARY3zjENJLwCKgqwOjLcnW30Qh/HnpmGYTJhT1bSdPL0NBpr+6rbs8qhIiPivQtRhDDJQuCViI4BxdJRrx/jBopob25BDmIMnzgZjFTK+2R4tAo4+q8iM9Ba3w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lpjqGT/gznDr/O3FXigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADq9QiMAAAAAAAAAAAAAAAA4sj7/Nq09s0uOaSI1qTplM6U68wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOrc//zu0P0EAAAAAOK4+UjWsPPgAAAAAAAAAAAAAAAAAAAAA/48AAP8HAAD4AQAA8AAAAOAAAADAAQAAwAMAAMAAAACAAwAAAAMAAHADAADwAAAA5AcAAO4HAAD+bwAA/u8AAA==
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -7,17 +7,18 @@
 # override and resource entries should go to browser/base/jar.mn to avoid
 # having to create the same entry for each locale.
 
 [localization] @AB_CD@.jar:
   browser                                          (%browser/**/*.ftl)
 
 @AB_CD@.jar:
 % locale browser @AB_CD@ %locale/browser/
-*   locale/browser/bookmarks.html                  (generic/profile/bookmarks.html.in)
+# bookmarks.html is produced by LOCALIZED_GENERATED_FILES.
+    locale/browser/bookmarks.html                  (bookmarks.html)
     locale/browser/aboutDialog.dtd                 (%chrome/browser/aboutDialog.dtd)
     locale/browser/aboutPrivateBrowsing.dtd        (%chrome/browser/aboutPrivateBrowsing.dtd)
     locale/browser/aboutPrivateBrowsing.properties (%chrome/browser/aboutPrivateBrowsing.properties)
     locale/browser/aboutRobots.dtd                 (%chrome/browser/aboutRobots.dtd)
     locale/browser/aboutHome.dtd                   (%chrome/browser/aboutHome.dtd)
     locale/browser/accounts.properties             (%chrome/browser/accounts.properties)
     locale/browser/aboutSearchReset.dtd            (%chrome/browser/aboutSearchReset.dtd)
     locale/browser/aboutSessionRestore.dtd         (%chrome/browser/aboutSessionRestore.dtd)
diff --git a/browser/locales/moz.build b/browser/locales/moz.build
--- a/browser/locales/moz.build
+++ b/browser/locales/moz.build
@@ -20,16 +20,26 @@ if CONFIG['MOZ_UPDATER']:
         'en-US/updater/updater.ini',
         '../installer/windows/nsis/updater_append.ini',
     ]
     # Yes, this is weird, but what can you do? This file doesn't want to be in the DIST_SUBDIR,
     # but we can't really move it to a different directory until we change how locale repacks
     # work.
     LOCALIZED_FILES['..'] += ['!updater.ini']
 
+LOCALIZED_GENERATED_FILES += ['bookmarks.html']
+bookmarks = LOCALIZED_GENERATED_FILES['bookmarks.html']
+bookmarks.script = 'generate_bookmarks.py'
+bookmarks.inputs = [
+    # This input will not be considered for localization.
+    'generic/profile/bookmarks.html.in',
+    # The `locales/en-US/` will be rewritten to the locale-specific path.
+    'en-US/profile/bookmarks.inc',
+]
+
 with Files("**"):
     BUG_COMPONENT = ("Toolkit", "Build Config")
 
 with Files("all-locales"):
     BUG_COMPONENT = ("Core", "Localization")
 
 with Files("en-US/**"):
     BUG_COMPONENT = ("Core", "Localization")
diff --git a/config/faster/rules.mk b/config/faster/rules.mk
--- a/config/faster/rules.mk
+++ b/config/faster/rules.mk
@@ -79,22 +79,20 @@ ACDEFINES += -DBUILD_FASTER
 # corresponding install manifests are named correspondingly, with forward
 # slashes replaced with underscores, and prefixed with `install_`. That is,
 # the install manifest for `dist/bin` would be `install_dist_bin`.
 $(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/,buildid.h source-repo.h)
 	@# For now, force preprocessed files to be reprocessed every time.
 	@# The overhead is not that big, and this avoids waiting for proper
 	@# support for defines tracking in process_install_manifest.
 	@touch install_$(subst /,_,$*)
-	@# BOOKMARKS_INCLUDE_DIR is for bookmarks.html only.
 	$(PYTHON) -m mozbuild.action.process_install_manifest \
 		--track install_$(subst /,_,$*).track \
 		$(TOPOBJDIR)/$* \
 		-DAB_CD=en-US \
-		-DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \
 		$(ACDEFINES) \
 		install_$(subst /,_,$*)
 
 # ============================================================================
 # Below is a set of additional dependencies and variables used to build things
 # that are not supported by data in moz.build.
 
 # The xpidl target in config/makefiles/xpidl requires the install manifest for
diff --git a/python/mozbuild/mozbuild/backend/tup.py b/python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -557,20 +557,16 @@ class TupBackend(CommonBackend):
                 pass
 
         with self._write_file(mozpath.join(self.environment.topobjdir, 'Tuprules.tup')) as fh:
             acdefines_flags = ' '.join(['-D%s=%s' % (name, shell_quote(value))
                 for (name, value) in sorted(self.environment.acdefines.iteritems())])
             # TODO: AB_CD only exists in Makefiles at the moment.
             acdefines_flags += ' -DAB_CD=en-US'
 
-            # TODO: BOOKMARKS_INCLUDE_DIR is used by bookmarks.html.in, and is
-            # only defined in browser/locales/Makefile.in
-            acdefines_flags += ' -DBOOKMARKS_INCLUDE_DIR=%s/browser/locales/en-US/profile' % self.environment.topsrcdir
-
             # Use BUILD_FASTER to avoid CXXFLAGS/CPPFLAGS in
             # toolkit/content/buildconfig.html
             acdefines_flags += ' -DBUILD_FASTER=1'
 
             fh.write('MOZ_OBJ_ROOT = $(TUP_CWD)\n')
             fh.write('DIST = $(MOZ_OBJ_ROOT)/dist\n')
             fh.write('ACDEFINES = %s\n' % acdefines_flags)
             fh.write('topsrcdir = $(MOZ_OBJ_ROOT)/%s\n' % (
diff --git a/python/mozbuild/mozbuild/faster_daemon.py b/python/mozbuild/mozbuild/faster_daemon.py
--- a/python/mozbuild/mozbuild/faster_daemon.py
+++ b/python/mozbuild/mozbuild/faster_daemon.py
@@ -67,26 +67,20 @@ class Daemon(object):
         self.config_environment = config_environment
         self._client = None
 
     @property
     def defines(self):
         defines = dict(self.config_environment.acdefines)
         # These additions work around warts in the build system: see
         # http://searchfox.org/mozilla-central/rev/ad093e98f42338effe2e2513e26c3a311dd96422/config/faster/rules.mk#92-93
-        # and
-        # http://searchfox.org/mozilla-central/rev/ad093e98f42338effe2e2513e26c3a311dd96422/python/mozbuild/mozbuild/backend/tup.py#244-253.
         defines.update({
             'AB_CD': 'en-US',
             'BUILD_FASTER': '1',
         })
-        defines.update({
-            'BOOKMARKS_INCLUDE_DIR': mozpath.join(self.config_environment.topsrcdir,
-                                                  'browser', 'locales', 'en-US', 'profile'),
-        })
         return defines
 
     @mozbuild.util.memoized_property
     def file_copier(self):
         # TODO: invalidate the file copier when the build system
         # itself changes, i.e., the underlying unified manifest
         # changes.
         file_copier = FileCopier()
