#!/usr/bin/perl
#
# ** Please have a look at CHANGELOG-<Maintainer> for the CHANGELOGs **
#
# This perl script can be used to create one big CHANGELOG from the others...
#

my %changes;
my ($d, $m);

print "\n";
chdir $1 if $0 =~ m,(.*)/,;

foreach $m (qw/CLIFFORD RENE ESDEN/) {
	open(F, "CHANGELOG-$m") || die "Can't open CHANGELOG-$m: $!";
	for ($d=''; <F>; $changes{$d} .= $_ if $d) {
		$d=$_ if s/^(\*.*)\n/$1 [$m]\n/;
	}
	close F;
}

print $changes{$_} foreach sort {$b cmp $a} keys %changes;

############################################################################
#                                                                          #
# EXTERIOR: DAGOBAH -- DAY                                                 #
#                                                                          #
# With Yoda strapped to his back, Luke climbs up one of the many thick     #
# vines that grow in the swamp until he reaches the Dagobah statistics     #
# lab. Panting heavily, he continues his exercises -- grepping,            #
# installing new packages, logging in as root, and writing replacements    #
# for two-year-old shell scripts in Python.                                #
#                                                                          #
# YODA: Code! Yes. A programmer's strength flows from code                 #
# maintainability. But beware of Perl. Terse syntax...more than one way    #
# to do it...default variables. The dark side of code maintainability      #
# are they. Easily they flow, quick to join you when code you write. If    #
# once you start down the dark path, forever will it dominate your         #
# destiny, consume you it will.                                            #
#                                                                          #
# LUKE: Is Perl better than Python?                                        #
#                                                                          #
# YODA: No... no... no. Quicker, easier, more seductive.                   #
#                                                                          #
# LUKE: But how will I know why Python is better than Perl?                #
#                                                                          #
# YODA: You will know. When your code you try to read six months from now. #
#                                                                          #
############################################################################

