- print "Generating list of active CVS files...\n";
- my($dir, @files);
- open(CVS, '-|', 'cvs status 2>&1') or die $!;
- while (<CVS>) {
- if (/^cvs status: Examining (.*)/) {
- if ($1 eq '.') {
- $dir = '';
- } else {
- push(@files, $1);
- $dir = $1 . '/';
- }
- } elsif (/^File: (.*?)\s+Status: (.*)/ && $1 ne '.cvsignore') {
- push(@files, $dir . $1);
- if ($2 ne 'Up-to-date') {
- print "*** Not up-to-date: $dir$1\n";
+ open(IN, '-|', 'git status') or die $!;
+ my $status = join('', <IN>);
+ close IN;
+ die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/;
+ die "The checkout is not on the master branch.\n" unless $status =~ /^# On branch master\n/;
+ system "make $gen_target" and die "make $gen_target failed!\n";
+
+ my @extra_files;
+ open(IN, '<', 'Makefile.in') or die "Couldn't open Makefile.in: $!\n";
+ while (<IN>) {
+ if (s/^GENFILES=//) {
+ while (s/\\$//) {
+ $_ .= <IN>;