diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2011-08-30 10:50:55 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-01 05:36:26 +0200 |
commit | 25a0cf881e6ca6dc8bd969e7047c3967796fcd94 (patch) | |
tree | 39b892ab7cf7a94f4b0a5882d52fd0ae68556221 /bin | |
parent | 964793718fee83d46103acb5deb0bde4fa78a9af (diff) |
Fix inclusion of .qmake.cache for modules with config tests.
Qt modules with config tests generate a module level .qmake.cache with
the results of the config tests. The existance of this file prevents
qmake from walking up the directory tree and finding the Qt global
cache file. This results in the system build not working as expected.
For example running 'make' in the module would only build the contents
of src and skip tests and examples.
Fixed by adding a include statement to the end of the config test
generated .qmake.cache.
Change-Id: I68a5f2a96f4ee02076b6457ae085f45d894cd4ed
Reviewed-on: http://codereview.qt.nokia.com/3830
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/qtmodule-configtests | 13 |
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"; |