diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-11-02 18:59:21 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-11-03 14:09:10 (GMT) |
commit | 3970bd54380a9438ce4765b0bb9a72d2b8bf2662 (patch) | |
tree | 6f499299ee397111fcbcee3a1c2d858b23de9e79 /bin | |
parent | 67dcf89760af14e65e2c62ebba513c987086b355 (diff) | |
download | Qt-3970bd54380a9438ce4765b0bb9a72d2b8bf2662.zip Qt-3970bd54380a9438ce4765b0bb9a72d2b8bf2662.tar.gz Qt-3970bd54380a9438ce4765b0bb9a72d2b8bf2662.tar.bz2 |
more elegant treatment of qconfig.h special case
instead of injecting it only if it is not there yet, exclude it if it is
already there and then unconditionally inject it. this makes things more
deterministic.
Reviewed-by: joerg
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -695,10 +695,7 @@ my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dis my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" ); my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" ); my %colliding_headers = (); -my %inject_headers; -# Force generation of forwarding header for qconfig.h if (and only if) we can't -# find the header by normal means. -%inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ) unless (-e "$basedir/src/corelib/global/qconfig.h"); +my %inject_headers = ( "$basedir/src/corelib/global" => ( "qconfig.h" ) ); # all from build dir foreach my $lib (@modules_to_sync) { #iteration info @@ -800,7 +797,12 @@ foreach my $lib (@modules_to_sync) { #calc files and "copy" them foreach my $subdir (@subdirs) { my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0); - push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir}); + if (defined $inject_headers{$subdir}) { + foreach my $if ($inject_headers{$subdir}) { + @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously + push @headers, "*".$if; + } + } foreach my $header (@headers) { my $shadow = ($header =~ s/^\*//); $header = 0 if($header =~ /^ui_.*.h/); |