build: make about:credits have proper inputs.
[email protected]
BUG=none
TEST=touch about_credits.tmpl && rebuild # actually works
Review URL: https://codereview.chromium.org/807713003
Cr-Commit-Position: refs/heads/master@{#308730}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 6cc56a2..c905a8f3 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -789,10 +789,15 @@
action("about_credits") {
script = "//tools/licenses.py"
- # TODO(phajdan.jr): input dependencies so this can be regenerated
- # automatically when one of the credits changes. The way this should work is
- # that licenses.py should write a .d file listing the input dependencies (see
- # "depfile" in GN).
+ inputs = [
+ # This is not a complete list. TODO(phajdan.jr, dbeam): licenses.py needs to
+ # generate a .d file with all the licenses/credits that about:credits uses.
+ # Then about:credits will automatically rebuild when one of them changes.
+ # See: depfile in gn's documentation (gn help depfile).
+ "resources/about_credits.tmpl",
+ "resources/about_credits_entry.tmpl",
+ ]
+
outputs = [
about_credits_file,
]
diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp
index c4c2e76b..0349764b 100644
--- a/chrome/chrome_resources.gyp
+++ b/chrome/chrome_resources.gyp
@@ -604,8 +604,11 @@
},
'action_name': 'generate_about_credits',
'inputs': [
- # TODO(phajdan.jr): make licenses.py print inputs too.
+ # TODO(phajdan.jr): make licenses.py print license input files so
+ # about:credits gets rebuilt when one changes.
'<(generator_path)',
+ 'browser/resources/about_credits.tmpl',
+ 'browser/resources/about_credits_entry.tmpl',
],
'outputs': [
'<(about_credits_file)',