let configure create the forwarding qconfig.h again
this avoids that syncqt needs to forward to a yet unexisting file (which will have a yet unknown location, when syncqt is run at packaging time already). the %inject_headers syncqt config variable remains, so it can be told not to purge "foreign" files. Change-Id: I127ff6e0b7d5702fb0acaee9a5b7940b482d3608 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
5d8b8eed90
commit
8d69232b28
@ -893,15 +893,8 @@ foreach my $lib (@modules_to_sync) {
|
|||||||
#calc files and "copy" them
|
#calc files and "copy" them
|
||||||
foreach my $subdir (@subdirs) {
|
foreach my $subdir (@subdirs) {
|
||||||
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
|
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
my $header_dirname = "";
|
my $header_dirname = "";
|
||||||
foreach my $header (@headers) {
|
foreach my $header (@headers) {
|
||||||
my $shadow = ($header =~ s/^\*//);
|
|
||||||
$header = 0 if($header =~ /^ui_.*.h/);
|
$header = 0 if($header =~ /^ui_.*.h/);
|
||||||
foreach (@ignore_headers) {
|
foreach (@ignore_headers) {
|
||||||
$header = 0 if($header eq $_);
|
$header = 0 if($header eq $_);
|
||||||
@ -923,7 +916,6 @@ foreach my $lib (@modules_to_sync) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $iheader = $subdir . "/" . $header;
|
my $iheader = $subdir . "/" . $header;
|
||||||
$iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow);
|
|
||||||
my @classes = $public_header && !$minimal ? classNames($iheader) : ();
|
my @classes = $public_header && !$minimal ? classNames($iheader) : ();
|
||||||
if($showonly) {
|
if($showonly) {
|
||||||
print "$header [$lib]\n";
|
print "$header [$lib]\n";
|
||||||
@ -964,7 +956,7 @@ foreach my $lib (@modules_to_sync) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach(@headers) { #sync them
|
foreach(@headers) { #sync them
|
||||||
$header_copies++ if(syncHeader($lib, $_, $iheader, $copy_headers && !$shadow, $ts));
|
$header_copies++ if (syncHeader($lib, $_, $iheader, $copy_headers, $ts));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($public_header) {
|
if($public_header) {
|
||||||
|
17
configure
vendored
17
configure
vendored
@ -6424,6 +6424,23 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# create a forwarding header
|
||||||
|
mkdir -p "$outpath/include/QtCore" || exit
|
||||||
|
echo '#include "../../src/corelib/global/qconfig.h"' > $outpath/include/QtCore/qconfig.h.new
|
||||||
|
if cmp -s "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h"; then
|
||||||
|
rm -f "$outpath/include/QtCore/qconfig.h.new"
|
||||||
|
else
|
||||||
|
mv "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h" || exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create a camelcase forwarding header
|
||||||
|
echo '#include "qconfig.h"' > $outpath/include/QtCore/QtConfig.new
|
||||||
|
if cmp -s "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig"; then
|
||||||
|
rm -f "$outpath/include/QtCore/QtConfig.new"
|
||||||
|
else
|
||||||
|
mv "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig" || exit
|
||||||
|
fi
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# save configuration into qconfig.pri
|
# save configuration into qconfig.pri
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -29,6 +29,11 @@ SOURCES += \
|
|||||||
# qlibraryinfo.cpp includes qconfig.cpp
|
# qlibraryinfo.cpp includes qconfig.cpp
|
||||||
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
|
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
|
||||||
|
|
||||||
|
# configure creates these, not syncqt, so we need to manually inject them
|
||||||
|
targ_headers.files += \
|
||||||
|
$$OUT_PWD/global/qconfig.h \
|
||||||
|
$$QT_BUILD_TREE/include/QtCore/QtConfig
|
||||||
|
|
||||||
# Only used on platforms with CONFIG += precompile_header
|
# Only used on platforms with CONFIG += precompile_header
|
||||||
PRECOMPILED_HEADER = global/qt_pch.h
|
PRECOMPILED_HEADER = global/qt_pch.h
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
%classnames = (
|
%classnames = (
|
||||||
"qglobal.h" => "QtGlobal",
|
"qglobal.h" => "QtGlobal",
|
||||||
"qendian.h" => "QtEndian",
|
"qendian.h" => "QtEndian",
|
||||||
"qconfig.h" => "QtConfig",
|
|
||||||
"qplugin.h" => "QtPlugin",
|
"qplugin.h" => "QtPlugin",
|
||||||
"qalgorithms.h" => "QtAlgorithms",
|
"qalgorithms.h" => "QtAlgorithms",
|
||||||
"qcontainerfwd.h" => "QtContainerFwd",
|
"qcontainerfwd.h" => "QtContainerFwd",
|
||||||
|
@ -3351,6 +3351,37 @@ void Configure::generateConfigfiles()
|
|||||||
tmpFile.close();
|
tmpFile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTemporaryFile tmpFile2;
|
||||||
|
if (tmpFile2.open()) {
|
||||||
|
tmpStream.setDevice(&tmpFile2);
|
||||||
|
tmpStream << "#include \"../../src/corelib/global/qconfig.h\"" << endl;
|
||||||
|
|
||||||
|
tmpStream.flush();
|
||||||
|
tmpFile2.flush();
|
||||||
|
|
||||||
|
outName = buildPath + "/include/QtCore/qconfig.h";
|
||||||
|
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
|
||||||
|
QFile::remove(outName);
|
||||||
|
|
||||||
|
tmpFile2.copy(outName);
|
||||||
|
tmpFile2.close();
|
||||||
|
}
|
||||||
|
QTemporaryFile tmpFile2a;
|
||||||
|
if (tmpFile2a.open()) {
|
||||||
|
tmpStream.setDevice(&tmpFile2a);
|
||||||
|
tmpStream << "#include \"qconfig.h\"" << endl;
|
||||||
|
|
||||||
|
tmpStream.flush();
|
||||||
|
tmpFile2a.flush();
|
||||||
|
|
||||||
|
outName = buildPath + "/include/QtCore/QtConfig";
|
||||||
|
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
|
||||||
|
QFile::remove(outName);
|
||||||
|
|
||||||
|
tmpFile2a.copy(outName);
|
||||||
|
tmpFile2a.close();
|
||||||
|
}
|
||||||
|
|
||||||
QTemporaryFile tmpFile3;
|
QTemporaryFile tmpFile3;
|
||||||
if (tmpFile3.open()) {
|
if (tmpFile3.open()) {
|
||||||
tmpStream.setDevice(&tmpFile3);
|
tmpStream.setDevice(&tmpFile3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user