Commit bd000dd2 authored by unknown's avatar unknown

mysql-copyright:

  Fixed vim to expandtab's, retab'd code
  Fixed CWD bug in trim_the_fat()


Build-tools/mysql-copyright:
  Fixed vim to expandtab's, retab'd code
  Fixed CWD bug in trim_the_fat()
parent df1c95e3
...@@ -104,11 +104,11 @@ sub main ...@@ -104,11 +104,11 @@ sub main
copy("$WD/Docs/MySQLEULA.txt", "$destdir"); copy("$WD/Docs/MySQLEULA.txt", "$destdir");
# remove readline, bdb subdirs and update 'configure' # remove readline, bdb subdirs and update 'configure'
my @extra_fat= ('cmd-line-utils/readline', 'bdb'); my @extra_fat= ('bdb', 'cmd-line-utils/readline');
foreach my $fat (@extra_fat) foreach my $fat (@extra_fat)
{ {
&trim_the_fat($fat); &trim_the_fat($fat);
} }
# fix file copyrights # fix file copyrights
...@@ -146,28 +146,30 @@ sub main ...@@ -146,28 +146,30 @@ sub main
#### ####
sub trim_the_fat sub trim_the_fat
{ {
my $the_fat= shift; my $the_fat= shift;
my $cwd= getcwd();
system("rm -rf $destdir/${the_fat}");
if ($win_flag) system("rm -rf $destdir/${the_fat}");
{ if ($win_flag)
chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n"; {
} chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n";
else }
{ else
chdir("$destdir"); {
unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; chdir("$destdir");
open(CONFIGURE,"<configure.in") or die "Unable to open configure.in for read: $!\n"; unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
undef $/; open(CONFIGURE,"<configure.in") or die "Unable to open configure.in for read: $!\n";
my $configure= <CONFIGURE>; undef $/;
close(CONFIGURE); my $configure= <CONFIGURE>;
$configure=~ s|${the_fat}/Makefile dnl\n?||g; close(CONFIGURE);
open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n"; $configure=~ s|${the_fat}/Makefile dnl\n?||g;
print CONFIGURE $configure; open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n";
close(CONFIGURE); print CONFIGURE $configure;
`autoconf`; close(CONFIGURE);
die "'./configure' was not produced!" unless (-f "configure") `autoconf`;
} die "'./configure' was not produced!" unless (-f "configure");
chdir("$cwd");
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment