The AutoFDO host tools live in a new top-level afdo_tools directory.  Teach
the ChangeLog checker about it so that commits touching that directory can
name their own ChangeLog file, and add it to the copyright updater so that
the notice in its ChangeLog is maintained with the rest of the tree.

contrib/ChangeLog:

        * gcc-changelog/git_commit.py (default_changelog_locations): Add
        afdo_tools.
        * update-copyright.py: Add afdo_tools folder.

Signed-off-by: Kugan Vivekanandarajah <[email protected]>
---
 contrib/gcc-changelog/git_commit.py | 1 +
 contrib/update-copyright.py         | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/contrib/gcc-changelog/git_commit.py 
b/contrib/gcc-changelog/git_commit.py
index 70732c8478e..dbbc3a6479a 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -25,6 +25,7 @@ import sys
 from collections import defaultdict
 
 default_changelog_locations = {
+    'afdo_tools',
     'c++tools',
     'config',
     'contrib',
diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py
index 4cc04784f99..c61d5332dab 100755
--- a/contrib/update-copyright.py
+++ b/contrib/update-copyright.py
@@ -786,6 +786,7 @@ class GCCCmdLine (CmdLine):
         CmdLine.__init__ (self, GCCCopyright)
 
         self.add_dir ('.', TopLevelFilter())
+        self.add_dir ('afdo_tools')
         # boehm-gc is imported from upstream.
         self.add_dir ('c++tools')
         self.add_dir ('config', ConfigFilter())
@@ -824,6 +825,7 @@ class GCCCmdLine (CmdLine):
         # zlib is imported from upstream.
 
         self.default_dirs = [
+            'afdo_tools',
             'c++tools',
             'contrib',
             'gcc',
-- 
2.34.1

Reply via email to