Message ID | 20210207202037.968-1-vapier@gentoo.org |
---|---|
State | New |
Headers | show |
Series | mklog: automatically fill in generated entries | expand |
On 2/7/21 9:20 PM, Mike Frysinger via Gcc-patches wrote: > contrib/ChangeLog: > > * mklog.py (generated_files): New set. > (generate_changelog): Add entries based on generated_files. > --- > contrib/mklog.py | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/contrib/mklog.py b/contrib/mklog.py > index a70536a6849a..6509886741d7 100755 > --- a/contrib/mklog.py > +++ b/contrib/mklog.py > @@ -55,6 +55,9 @@ bugzilla_url = 'https://gcc.gnu.org/bugzilla/rest.cgi/bug?id=%s&' \ > > function_extensions = {'.c', '.cpp', '.C', '.cc', '.h', '.inc', '.def', '.md'} > > +# NB: Makefile.in isn't listed as it's not always generated. > +generated_files = {'aclocal.m4', 'config.h.in', 'configure'} > + > help_message = """\ > Generate ChangeLog template for PATCH. > PATCH must be generated using diff(1)'s -up or -cp options > @@ -192,6 +195,8 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): > if new_path.startswith(changelog): > new_path = new_path[len(changelog):].lstrip('/') > out += '\t* %s: ...here.\n' % (new_path) > + elif os.path.basename(file.path) in generated_files: > + out += '\t* %s: Regenerate.\n' % (relative_path) > else: > if not no_functions: > for hunk in file: > Thanks for the patch, it's fine. Please install it. Martin
On Sun, 7 Feb 2021, Mike Frysinger via Gcc-patches wrote: > +# NB: Makefile.in isn't listed as it's not always generated. > +generated_files = {'aclocal.m4', 'config.h.in', 'configure'} libiberty/aclocal.m4 isn't a generated file either.
On 08 Feb 2021 22:44, Joseph Myers wrote: > On Sun, 7 Feb 2021, Mike Frysinger via Gcc-patches wrote: > > +# NB: Makefile.in isn't listed as it's not always generated. > > +generated_files = {'aclocal.m4', 'config.h.in', 'configure'} > > libiberty/aclocal.m4 isn't a generated file either. that is ... weird. maybe it's a vintage thing. any reason it needs to stay this way ? looks like it'd be trivial to switch it over to acinclude.m4. -mike
diff --git a/contrib/mklog.py b/contrib/mklog.py index a70536a6849a..6509886741d7 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -55,6 +55,9 @@ bugzilla_url = 'https://gcc.gnu.org/bugzilla/rest.cgi/bug?id=%s&' \ function_extensions = {'.c', '.cpp', '.C', '.cc', '.h', '.inc', '.def', '.md'} +# NB: Makefile.in isn't listed as it's not always generated. +generated_files = {'aclocal.m4', 'config.h.in', 'configure'} + help_message = """\ Generate ChangeLog template for PATCH. PATCH must be generated using diff(1)'s -up or -cp options @@ -192,6 +195,8 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): if new_path.startswith(changelog): new_path = new_path[len(changelog):].lstrip('/') out += '\t* %s: ...here.\n' % (new_path) + elif os.path.basename(file.path) in generated_files: + out += '\t* %s: Regenerate.\n' % (relative_path) else: if not no_functions: for hunk in file: