diff options
author | unknown <mwagner@here.mwagner.org> | 2004-06-23 15:39:51 -0500 |
---|---|---|
committer | unknown <mwagner@here.mwagner.org> | 2004-06-23 15:39:51 -0500 |
commit | dc525227919d926d35fc012b202c55de94d74c6d (patch) | |
tree | 55d852cfef976f78102834f5804befdeb34c7715 /Build-tools | |
parent | 253e0a213be0dfff1c201d62081ec05cbd1bfae8 (diff) | |
parent | bd000dd2329fd1365f20f13ee2164423d897f3f8 (diff) | |
download | mariadb-git-dc525227919d926d35fc012b202c55de94d74c6d.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into here.mwagner.org:/Volumes/BK/mysql-4.1
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/mysql-copyright | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright index adc4ae34a50..f2da3cdf447 100755 --- a/Build-tools/mysql-copyright +++ b/Build-tools/mysql-copyright @@ -102,27 +102,13 @@ sub main # exist in the new mysql distributions, but let's be sure.. unlink("$destdir/PUBLIC", "$destdir/README"); copy("$WD/Docs/MySQLEULA.txt", "$destdir"); - - # remove readline subdir and update configure accordingly - system("rm -rf $destdir/cmd-line-utils/readline"); - if ($win_flag) { - chdir("$destdir") or (print "$! Unable to change directory to $desdir!\n" && exit(0)); - } else { - chdir("$destdir"); - unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; - open(CONFIGURE,"<configure.in") or die "$! Unable to open configure.in to read from!\n"; - undef $/; - my $configure = <CONFIGURE>; - close(CONFIGURE); - $configure =~ s|cmd\-line\-utils/readline/Makefile dnl\n?||g; - open(CONFIGURE,">configure.in") or die "$! Unable to open configure.in to write to!\n"; - print CONFIGURE $configure; - close(CONFIGURE); - `autoconf`; - if (! -f "configure") { - print "\"./configure\" was not produced, exiting!\n"; - exit(0); - } + + # remove readline, bdb subdirs and update 'configure' + my @extra_fat= ('bdb', 'cmd-line-utils/readline'); + + foreach my $fat (@extra_fat) + { + &trim_the_fat($fat); } # fix file copyrights @@ -155,6 +141,39 @@ sub main } #### +#### This function will remove unwanted parts of a src tree for the mysqlcom +#### distributions. +#### +sub trim_the_fat +{ + my $the_fat= shift; + my $cwd= getcwd(); + + system("rm -rf $destdir/${the_fat}"); + if ($win_flag) + { + chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n"; + } + else + { + chdir("$destdir"); + unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; + open(CONFIGURE,"<configure.in") or die "Unable to open configure.in for read: $!\n"; + undef $/; + my $configure= <CONFIGURE>; + close(CONFIGURE); + $configure=~ s|${the_fat}/Makefile dnl\n?||g; + open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n"; + print CONFIGURE $configure; + close(CONFIGURE); + `autoconf`; + die "'./configure' was not produced!" unless (-f "configure"); + chdir("$cwd"); + } +} + + +#### #### mysqld and MySQL client programs have a usage printed with --help. #### This usage includes a copyright, which needs to be modified #### |