]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Import mklog.py from gcc repo
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 25 Sep 2020 14:24:29 +0000 (10:24 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 25 Sep 2020 14:24:44 +0000 (10:24 -0400)
commitee1b8b9477b7e49ecc0bf40be0f60726815eb4ca
treeb70fc7ab14b6ca5f996e7541f268270d80ce456f
parente851246a2a04b814632ab7b205faa84655c2acdc
Import mklog.py from gcc repo

I've been using the mklog utility from the gcc repo for a while to
generate skeleton of ChangeLog entries.  It recently got a rewrite as a
Python script.  Unfortunately, to find the repository root, and
eventually to find in which ChangeLog file each entry goes, the new
script assumes it is located in the same git repository that it
generates ChangeLog entries for.

This means that if you make a change in the gcc source tree and run
mklog.py from that same source tree, it works.  But if you make changes
in your ~/src/binutils-gdb tree and run ~/src/gcc/contrib/mklog.py, it
won't work.

IIRC, the old script required that you ran it with the project's root
directory as the CWD.

The simplest way to fix this is to import the script in binutils-gdb and
use it from there.  It's also nice because we can use it without having
a clone of the gcc repo.

I also thought of adding a "--root" switch to the script to override the
project's base directory.  However:

1) It is more work.
2) If the script still lives in the gcc repo, it's less convenient than
   having it in binutils-gdb.

This patch imports contrib/mklog.py from the gcc repo, revision
c560591408440f441b8b327f5b41f9328d20b67b.

contrib/ChangeLog:

* mklog.py: New file, imported from gcc.

Note: the ChangeLog entry above was generated using
`git show | ./mklog.py`!

Change-Id: I955592ce6397681986dc82a09593c32d8b8de54f
contrib/ChangeLog
contrib/mklog.py [new file with mode: 0755]