+unless ($skip_branch_check) {
+ die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/;
+}
+my($starting_branch) = $status =~ /^# On branch (.+)\n/;
+
+my @extra_files;
+open(IN, '<', 'Makefile.in') or die "Couldn't open Makefile.in: $!\n";
+while (<IN>) {
+ if (s/^GENFILES=//) {
+ while (s/\\$//) {
+ $_ .= <IN>;
+ }
+ @extra_files = split(' ', $_);
+ last;
+ }
+}
+close IN;
+
+if ($incl_generated_files) {
+ die "'$tmp_dir' must not exist in the current directory.\n" if -e $tmp_dir;
+ mkdir($tmp_dir, 0700) or die "Unable to mkdir($tmp_dir): $!\n";
+ system "./config.status Makefile && make gen && rsync -a @extra_files $tmp_dir/master/" and exit 1;
+}
+my $last_touch = time;