summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/qtmodule-configtests13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/qtmodule-configtests b/bin/qtmodule-configtests
index ab03908c84..4b4c5ae96c 100755
--- a/bin/qtmodule-configtests
+++ b/bin/qtmodule-configtests
@@ -299,9 +299,10 @@ if (abs_path($out_basedir) ne abs_path($qtbasedir)) {
# Generate the new contents
my $newContents = $existingContents;
- # Strip out any existing config test results
- $newContents =~ s/^config_test_.*$//gms;
- $newContents =~ s/^# Compile time test results.*$//gms;
+ # Strip out any existing config test results or include statements
+ $newContents =~ s/^config_test_[^\$]*$//gm;
+ $newContents =~ s/^# Compile time test results[^\$]*$//gm;
+ $newContents =~ s/include\(\$\$PWD\/..\/.qmake.cache\)$//gm;
# Add any remaining content and make sure we start on a new line
if ($newContents and chop $newContents ne '\n') {
@@ -318,6 +319,12 @@ if (abs_path($out_basedir) ne abs_path($qtbasedir)) {
}
}
+ # Remove blank lines
+ $newContents =~ s/^[\s]*$//gms;
+
+ # Include top level .qmake.cache
+ $newContents = $newContents . "include(\$\$PWD/../.qmake.cache)\n";
+
# and open the file
open my $cacheFileHandle, ">$qmakeCachePath" or die "Unable to open $qmakeCachePath for writing: $!\n";