This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Improving mklog [was: Re: RFC Asan instrumentation control]
- From: Diego Novillo <dnovillo at google dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Thu, 19 Dec 2013 08:47:21 -0500
- Subject: Re: Improving mklog [was: Re: RFC Asan instrumentation control]
- Authentication-results: sourceware.org; auth=none
- References: <20131206120929 dot GJ892 at tucnak dot redhat dot com> <CAGQ9bdw4O9xF=-KKf8sX-iNVnzoy3=A_cmViEGTi98THEFWW0A at mail dot gmail dot com> <52A1C564 dot 3030505 at samsung dot com> <CAGQ9bdx9=T7jreZLTf2o=2PiSr1HAft-7E6nFrhyei59LV_Zag at mail dot gmail dot com> <52A1CCE0 dot 40307 at samsung dot com> <CAGQ9bdyyqqW0nibRHnqSCVe4XdahaipVQJBbKhFfEoAJLtUZ4w at mail dot gmail dot com> <52A1D1E3 dot 1040200 at samsung dot com> <52B18887 dot 9080605 at partner dot samsung dot com> <20131218115930 dot GX892 at tucnak dot redhat dot com> <52B2CA3B dot 20008 at samsung dot com> <20131219105411 dot GR892 at tucnak dot redhat dot com> <52B2E3CD dot 8060106 at samsung dot com> <52B2EECF dot 4090003 at samsung dot com>
On Thu, Dec 19, 2013 at 8:04 AM, Yury Gribov <y.gribov@samsung.com> wrote:
> On 12/19/2013 04:17 PM, Yury Gribov wrote:
>>> In my experience mklog is pretty much useless, e.g. if you
>>> add a new function, it will list the previous function as being modified
>>> rather than the new one, etc.
>>
>> In my experience it prints both the old and the new one. If that's a
>> problem we could probably fix it (I mean I can volunteer).
>>
>> Here's a draft patch for mklog which splits generated ChangeLog entry
>> into several parts (so no more spurious gcc/ or gcc/testsuite/).
>> I can continue working on this if people find it useful.
>
> Removed Kostya and Max, added Diego as original author of mklog.
Oh, crud, why did I have to write it in Perl? Sigh.
The patch is fine (some tweaks below). If someone volunteers to
re-write it in Python, I think it would make it easier to keep
extending. Ultimately, mklog ought to write the ChangeLog itself. We
get rid of that headache, at least.
diff --git a/contrib/mklog b/contrib/mklog
index a874c72..a9bf276 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -34,6 +34,10 @@ $name = @n[1]; chop($name);
$addr = $username . "\@my.domain.org";
$date = `date +%Y-%m-%d`; chop ($date);
+$gcc_root = $0;
+$gcc_root =~ s/[^\\\/]+$/../;
+chdir $gcc_root;
+
#-----------------------------------------------------------------------------
# Program starts here. You should not need to edit anything below this
@@ -53,13 +57,26 @@ $basename = `basename $diff`; chop ($basename);
$cl = `mktemp /tmp/$basename.XXXXXX` || exit 1; chop ($cl);
$hdrline = "$date $name <$addr>";
-open (CLFILE, ">$cl") or die "Could not open file $cl for writing";
-
-print CLFILE "$hdrline\n\n";
+my %clog_entries;
I'd rather continue using 'cl' to abbreviate ChangeLog, instead of 'clog'.