When building against Qt5 with GCC we would just run 'make' in the build dir,
and rely on the dependency files output by GCC (-MD) to handle dependency
tracking, but that fails for special-cases like adding a Q_OBJECT macro
to a header.
To guarantee that an incrmental build will work, we have to run 'make qmake',
which we now do on every build-webkit that's followed by a successful run
of update-webkit. The reasoning is that update-webkit can result in such
potential corner-cases being applied, and since we can't know for sure
unless we inspect the diff and account for all the corner cases we assume
the worst and always run 'make qmake'.
After a succesful run of build-webkit we proceed to do just 'make' for any
subsequent runs, since we assume that the developer knows what kind of
changes he/she is doing, and when a 'make qmake' is needed.
Reviewed by Simon Hausmann.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105398
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
# Ignore files generated by the Qt build-system:
Source/qtwebkitversion.h
+Tools/qmake/.build-hint
+2012-01-19 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Make build-webkit always do safe incremental builds after update-webkit
+
+ When building against Qt5 with GCC we would just run 'make' in the build dir,
+ and rely on the dependency files output by GCC (-MD) to handle dependency
+ tracking, but that fails for special-cases like adding a Q_OBJECT macro
+ to a header.
+
+ To guarantee that an incrmental build will work, we have to run 'make qmake',
+ which we now do on every build-webkit that's followed by a successful run
+ of update-webkit. The reasoning is that update-webkit can result in such
+ potential corner-cases being applied, and since we can't know for sure
+ unless we inspect the diff and account for all the corner cases we assume
+ the worst and always run 'make qmake'.
+
+ After a succesful run of build-webkit we proceed to do just 'make' for any
+ subsequent runs, since we assume that the developer knows what kind of
+ changes he/she is doing, and when a 'make qmake' is needed.
+
+ Reviewed by Simon Hausmann.
+
+ * .gitignore:
+
2012-01-18 Dirk Pranke <dpranke@chromium.org>
[chromium] move Tools.gyp, switch build-webkit --chromium to All.gyp
+2012-01-19 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Make build-webkit always do safe incremental builds after update-webkit
+
+ When building against Qt5 with GCC we would just run 'make' in the build dir,
+ and rely on the dependency files output by GCC (-MD) to handle dependency
+ tracking, but that fails for special-cases like adding a Q_OBJECT macro
+ to a header.
+
+ To guarantee that an incrmental build will work, we have to run 'make qmake',
+ which we now do on every build-webkit that's followed by a successful run
+ of update-webkit. The reasoning is that update-webkit can result in such
+ potential corner-cases being applied, and since we can't know for sure
+ unless we inspect the diff and account for all the corner cases we assume
+ the worst and always run 'make qmake'.
+
+ After a succesful run of build-webkit we proceed to do just 'make' for any
+ subsequent runs, since we assume that the developer knows what kind of
+ changes he/she is doing, and when a 'make qmake' is needed.
+
+ Reviewed by Simon Hausmann.
+
+ * Scripts/update-webkit:
+ * Scripts/webkitdirs.pm:
+ (determineCurrentSVNRevision):
+ (currentSVNRevision):
+ (buildQMakeProjects):
+ * qmake/mkspecs/features/default_post.prf:
+
2012-01-18 Ryosuke Niwa <rniwa@webkit.org>
run-perf-tests should support Skipped list
determineIsChromium();
determineIsChromiumAndroid();
-
+determineIsQt();
determineIsWinCairo();
chdirWebKit();
my $startTime = time();
+my $initialRevision = currentSVNRevision();
+
my @svnOptions = ();
push @svnOptions, '-q' if $quiet;
runSvnUpdate() if isSVN();
runGitUpdate() if isGit();
+# The update might have given us a new revision
+determineCurrentSVNRevision();
+
if (-d "../Internal") {
chdir("../Internal");
print "Updating Internal\n" unless $quiet;
# WinCairo shares the auxiliary libs from the Apple port.
system("perl", "Tools/Scripts/update-webkit-wincairo-libs") == 0 or die;
}
+} elsif (isQt()) {
+ if (currentSVNRevision() ne $initialRevision) {
+ my $hintFile = File::Spec->catfile(sourceDir(), "Tools", "qmake", ".build-hint");
+ open(HINTFILE, ">$hintFile") || die("Could not open $hintFile for writing!\n");
+ print HINTFILE "incremental\n";
+ close(HINTFILE);
+ }
}
setupAppleWinEnv() if isAppleWinWebKit();
sub determineCurrentSVNRevision
{
- return if defined $currentSVNRevision;
+ # We always update the current SVN revision here, and leave the caching
+ # to currentSVNRevision(), so that changes to the SVN revision while the
+ # script is running can be picked up by calling this function again.
determineSourceDir();
$currentSVNRevision = svnRevisionForDirectory($sourceDir);
return $currentSVNRevision;
sub currentSVNRevision
{
- determineCurrentSVNRevision();
+ determineCurrentSVNRevision() if not defined $currentSVNRevision;
return $currentSVNRevision;
}
my %defines = qtFeatureDefaults(\@buildArgs);
+ my $pathToBuildHint = File::Spec->catfile(sourceDir(), "Tools", "qmake", ".build-hint");
+ my $buildHint = "";
+ if (-e $pathToBuildHint && open(BUILDHINT, $pathToBuildHint)) {
+ chomp($buildHint = <BUILDHINT>);
+ close(BUILDHINT);
+ }
+
my $needsCleanBuild = 0;
my $pathToDefinesCache = File::Spec->catfile($dir, ".webkit.config");
if ($clean) {
$command = "$command distclean";
- } else {
+ } elsif ($buildHint =~ /^incremental$/) {
$command = "$command incremental";
}
$result = system $command;
chdir ".." or die;
+
+ unlink($pathToBuildHint) || die "Could not delete $pathToBuildHint: $!" if $result eq 0;
+
return $result;
}
}
incremental.target = incremental
-!CONFIG(GNUmake): incremental.commands += $(MAKE) -f $(MAKEFILE) qmake &&
-incremental.commands += $(MAKE) -f $(MAKEFILE)
+incremental.commands = $(MAKE) -f $(MAKEFILE) qmake && $(MAKE) -f $(MAKEFILE)
QMAKE_EXTRA_TARGETS += incremental
# Don't set OBJECTS_DIR for subdirs, as that will unconditionally