Source

Target

Commits (5)
Showing with 18 additions and 34 deletions
...@@ -522,32 +522,6 @@ sub checkoutBranch ...@@ -522,32 +522,6 @@ sub checkoutBranch
return 1; return 1;
} }
sub buildWebKit
{
my $webkit = 'qtwebkit';
chdir($webkit) or die ('Failed to chdir from' . $rootDir . ' to "' . $webkit . '":' . $!);
my $webOutDir = File::Spec->catfile($rootDir, $webkit, 'WebKitBuild');
print 'Setting WEBKITOUTPUTDIR: ', $webOutDir, "\n";
$ENV{'WEBKITOUTPUTDIR'} = $webOutDir;
if ($os == $OS_WINDOWS) { # get bison from mother repository
my $toolsPath = File::Spec->catfile($rootDir, 'gnuwin32', 'bin');
my $path = $ENV{'PATH'};
$path .= ';' unless $path =~ /;$/; # SDKs create trailing semicolons
$path .= $toolsPath;
print 'Adding tools to path: ', $toolsPath, "\n";
$ENV{'PATH'} = $path;
}
my $script = File::Spec->catfile($rootDir, $webkit, 'Tools', 'Scripts', 'build-webkit');
my $qmake = File::Spec->catfile($rootDir, 'qtbase', 'bin', 'qmake');
$qmake .= '.exe' if ($os == $OS_WINDOWS);
my @args = ($script, '--qt', '--no-netscape-plugin');
push (@args, '--no-webkit2') if $os == $OS_WINDOWS;
push (@args, '--qmake=' . $qmake, '--makeargs=' . join(' ', @makeArgs));
push (@args, '--release') unless grep('-debug', split(' ', readQt5ToolConfig('configureArguments')));
executeCheck('perl', @args);
chdir($rootDir);
}
# --------------- MAIN: Parse arguments # --------------- MAIN: Parse arguments
$Getopt::ignoreCase = 0; $Getopt::ignoreCase = 0;
...@@ -864,6 +838,10 @@ if ( $BUILD != 0 ) { ...@@ -864,6 +838,10 @@ if ( $BUILD != 0 ) {
my @configureArguments; my @configureArguments;
my $configureArgumentsFromConfig = readQt5ToolConfig('configureArguments'); my $configureArgumentsFromConfig = readQt5ToolConfig('configureArguments');
push(@configureArguments, split(/ /, $configureArgumentsFromConfig)) unless $configureArgumentsFromConfig eq ''; push(@configureArguments, split(/ /, $configureArgumentsFromConfig)) unless $configureArgumentsFromConfig eq '';
if (!$BUILD_WEBKIT) {
push(@configureArguments, "-skip");
push(@configureArguments, "qtwebkit");
}
$makeInstallRequired = grep(/^-prefix$/, @configureArguments); $makeInstallRequired = grep(/^-prefix$/, @configureArguments);
# --- Shadow builds: Remove and re-create directory # --- Shadow builds: Remove and re-create directory
my $shadowBuildDir = shadowBuildFolder(); my $shadowBuildDir = shadowBuildFolder();
...@@ -892,10 +870,6 @@ if ( $BUILD + $MAKE != 0) { ...@@ -892,10 +870,6 @@ if ( $BUILD + $MAKE != 0) {
executeCheck($make, @makeArgs); executeCheck($make, @makeArgs);
} # MAKE } # MAKE
if ( $BUILD_WEBKIT != 0) {
buildWebKit();
}
if ( $BUILD && $makeInstallRequired ) { if ( $BUILD && $makeInstallRequired ) {
print 'Installing Qt 5 from ',$rootDir,"\n"; print 'Installing Qt 5 from ',$rootDir,"\n";
my @installArgs = @makeArgs; my @installArgs = @makeArgs;
......
...@@ -323,8 +323,13 @@ sub styleFail($) ...@@ -323,8 +323,13 @@ sub styleFail($)
push @style_fails, $lineno.": ".$why; push @style_fails, $lineno.": ".$why;
} }
my $no_copyright = 0;
sub flushFile() sub flushFile()
{ {
if ($no_copyright) {
&complain("Missing copyright header", "copyright");
}
if (@style_fails) { if (@style_fails) {
&complain("Style issues", "style", -1); &complain("Style issues", "style", -1);
for my $sf (@style_fails) { for my $sf (@style_fails) {
...@@ -357,8 +362,11 @@ while (<DIFF>) { ...@@ -357,8 +362,11 @@ while (<DIFF>) {
} }
next; next;
} }
if ($lineno < 50 && $check_gen) { if ($lineno < 50) {
if (/All changes made in this file will be lost|This file is automatically generated|DO NOT EDIT|DO NOT delete this file|[Gg]enerated by|uicgenerated|produced by gperf/) { if ($no_copyright && /Copyright/) {
$no_copyright = 0;
}
if ($check_gen && /All changes made in this file will be lost|This file is automatically generated|DO NOT EDIT|DO NOT delete this file|[Gg]enerated by|uicgenerated|produced by gperf/) {
&complain("Adding generated file", "generated") if ($new_file && !defined($cfg{generated})); &complain("Adding generated file", "generated") if ($new_file && !defined($cfg{generated}));
$ws_check = 0; $ws_check = 0;
$check_gen = 0; $check_gen = 0;
...@@ -455,6 +463,7 @@ while (<DIFF>) { ...@@ -455,6 +463,7 @@ while (<DIFF>) {
$conflict_fail = defined($cfg{conflict}); $conflict_fail = defined($cfg{conflict});
$braces = 0; $braces = 0;
$check_gen = 0; $check_gen = 0;
$no_copyright = 0;
next; next;
} }
if ($maybe_bin && /^Binary files /) { if ($maybe_bin && /^Binary files /) {
...@@ -491,11 +500,12 @@ while (<DIFF>) { ...@@ -491,11 +500,12 @@ while (<DIFF>) {
if (!defined($cfg{giant})) { if (!defined($cfg{giant})) {
&complain("Adding huge file (".formatSize($size)." > 2MiB)", "giant", 1); &complain("Adding huge file (".formatSize($size)." > 2MiB)", "giant", 1);
} }
} elsif ($size > 50000 && !$issrc && !defined($cfg{size})) { } elsif ($size > 51200 && !$issrc && !defined($cfg{size})) {
&complain("Warning: Adding big file (".formatSize($size)." > 50kB)", "size"); &complain("Warning: Adding big file (".formatSize($size)." > 50KiB)", "size");
} }
$size = 0; $size = 0;
$new_file = 1; $new_file = 1;
$no_copyright = $issrc && $file !~ /\.qdocconf$/i;
} elsif ($size > 20000 && !$issrc && !defined($cfg{size})) { } elsif ($size > 20000 && !$issrc && !defined($cfg{size})) {
my $old_size = 0; my $old_size = 0;
for my $old_tree (split(/,/, $old_trees)) { for my $old_tree (split(/,/, $old_trees)) {
......