summaryrefslogtreecommitdiff
path: root/Build-tools
diff options
context:
space:
mode:
authorunknown <mwagner@here.mwagner.org>2004-06-23 12:31:10 -0500
committerunknown <mwagner@here.mwagner.org>2004-06-23 12:31:10 -0500
commitdf1c95e3f4cf64ec93b08722ed6f0d6f035da82b (patch)
tree11c138ee9b469bc70b226d1dcdf08ba5917c325e /Build-tools
parentde6285928dc948cf2f2a4cf5139f7c072c5f5929 (diff)
downloadmariadb-git-df1c95e3f4cf64ec93b08722ed6f0d6f035da82b.tar.gz
mysql-copyright:
Cleaned-up trim_the_fat() Build-tools/mysql-copyright: Cleaned-up trim_the_fat() BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'Build-tools')
-rwxr-xr-xBuild-tools/mysql-copyright59
1 files changed, 38 insertions, 21 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright
index adc4ae34a50..74f6c743bfa 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= ('cmd-line-utils/readline', 'bdb');
+
+ foreach my $fat (@extra_fat)
+ {
+ &trim_the_fat($fat);
}
# fix file copyrights
@@ -155,6 +141,37 @@ sub main
}
####
+#### This function will remove unwanted parts of a src tree for the mysqlcom
+#### distributions.
+####
+sub trim_the_fat
+{
+ my $the_fat= shift;
+
+ 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")
+ }
+}
+
+
+####
#### mysqld and MySQL client programs have a usage printed with --help.
#### This usage includes a copyright, which needs to be modified
####