Revert "Put the generated <module>version.h into build tree"
After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component. This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8 Reviewed-by: Liang Qi <liang.qi@nokia.com>
This commit is contained in:
parent
e33e761bb5
commit
f6f1a2dbc1
bin
src
corelib
dbus
gui
network
opengl
platformsupport
printsupport
sql
testlib
widgets
xml
27
bin/syncqt
27
bin/syncqt
@ -72,9 +72,6 @@ $qtbasedir =~ s=\\=/=g if (defined $qtbasedir);
|
||||
# will be defined based on the modules sync.profile
|
||||
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %mastercontent, %modulepris, %explicitheaders, %deprecatedheaders);
|
||||
|
||||
# store the build path for %modules
|
||||
my %modules_build = ();
|
||||
|
||||
# global variables (modified by options)
|
||||
my $isunix = 0;
|
||||
my $module = 0;
|
||||
@ -833,14 +830,6 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate;
|
||||
|
||||
$isunix = checkUnix; #cache checkUnix
|
||||
|
||||
foreach my $lib (@modules_to_sync) {
|
||||
my $modulebuildpath = "$out_basedir" . substr($modules{$lib}, length($basedir));
|
||||
unless(-e $modulebuildpath) {
|
||||
make_path($modulebuildpath, $lib, $verbose_level);
|
||||
}
|
||||
$modules_build{$lib} = $modulebuildpath;
|
||||
}
|
||||
|
||||
foreach my $lib (@modules_to_sync) {
|
||||
#iteration info
|
||||
my $dir = $modules{$lib};
|
||||
@ -944,7 +933,8 @@ foreach my $lib (@modules_to_sync) {
|
||||
my $modulepri = $modulepris{$lib};
|
||||
if (-e $modulepri) {
|
||||
my $modulepriname = basename($modulepri);
|
||||
my $moduleversionheader = $modules_build{$lib} . "/" . lc($lib) . "version.h";
|
||||
# FIXME: this creates a file in the source location for shadow-builds
|
||||
my $moduleversionheader = "$modules{$lib}/" . lc($lib) . "version.h";
|
||||
my $modulehexstring = sprintf("0x%02X%02X%02X", $module_major_version, $module_minor_version, $module_patch_version);
|
||||
open MODULE_VERSION_HEADER_FILE, ">$moduleversionheader" or die "Can't open $moduleversionheader for writing";
|
||||
print MODULE_VERSION_HEADER_FILE "/* This file was generated by syncqt with the info from sync.profile. */\n";
|
||||
@ -957,6 +947,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
print MODULE_VERSION_HEADER_FILE "\n";
|
||||
print MODULE_VERSION_HEADER_FILE "#endif // QT_". uc($lib) . "_VERSION_H\n";
|
||||
close MODULE_VERSION_HEADER_FILE;
|
||||
$moduleversionheader = "<srcbase>" . substr($moduleversionheader, length($basedir)) if ($verbose_level < 2);
|
||||
print "$lib: created version header $moduleversionheader\n" if($verbose_level);
|
||||
} elsif ($modulepri) {
|
||||
print "$lib: WARNING: Module\'s pri file '$modulepri' not found.\n$lib: Skipped creating module version header.\n";
|
||||
@ -975,8 +966,6 @@ foreach my $lib (@modules_to_sync) {
|
||||
foreach my $headers_dir (@headers_paths) {
|
||||
#calc subdirs
|
||||
my @subdirs = ($headers_dir);
|
||||
#add the path for version header
|
||||
push(@subdirs, $modules_build{$lib}) if ($modules_build{$lib});
|
||||
foreach my $subdir (@subdirs) {
|
||||
opendir DIR, $subdir or next;
|
||||
foreach my $t (sort readdir(DIR)) {
|
||||
@ -1100,10 +1089,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
|
||||
if ($verbose_level && $header_copies) {
|
||||
my $new_header_dirname = dirname($iheader);
|
||||
if ($new_header_dirname && $verbose_level < 2) {
|
||||
$new_header_dirname = "<srcbase>" . substr($new_header_dirname, length($basedir)) if ($new_header_dirname =~ /$basedir/);
|
||||
$new_header_dirname = "<outbase>" . substr($new_header_dirname, length($out_basedir)) if ($new_header_dirname =~ /$out_basedir/);
|
||||
}
|
||||
$new_header_dirname = "<srcbase>" . substr($new_header_dirname, length($basedir)) if ($new_header_dirname && $verbose_level < 2);
|
||||
my $header_base = basename($iheader);
|
||||
if ($verbose_level < 3) {
|
||||
my $line_prefix = ",";
|
||||
@ -1116,10 +1102,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
}
|
||||
print "$line_prefix $header_base ($header_copies)";
|
||||
} else { # $verbose_level >= 3
|
||||
if ($verbose_level == 3) {
|
||||
$iheader = "<srcbase>" . substr($iheader, length($basedir)) if ($iheader =~ /$basedir/);
|
||||
$iheader = "<outbase>" . substr($iheader, length($out_basedir)) if ($iheader =~ /$out_basedir/);
|
||||
}
|
||||
$iheader = "<srcbase>" . substr($iheader, length($basedir)) if ($verbose_level == 3);
|
||||
print "$lib: created $header_copies fwd-include headers for $iheader\n";
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtcoreversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/corelib/qtcoreversion.h
|
||||
|
||||
include(animation/animation.pri)
|
||||
include(arch/arch.pri)
|
||||
|
@ -33,7 +33,7 @@ win32 {
|
||||
}
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtdbusversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/dbus/qtdbusversion.h
|
||||
|
||||
PUB_HEADERS = qdbusargument.h \
|
||||
qdbusconnectioninterface.h \
|
||||
|
@ -21,7 +21,7 @@ testcocoon {
|
||||
load(testcocoon)
|
||||
}
|
||||
|
||||
HEADERS += $$OUT_PWD/qtguiversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/gui/qtguiversion.h
|
||||
|
||||
include(accessible/accessible.pri)
|
||||
include(kernel/kernel.pri)
|
||||
|
@ -22,7 +22,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtnetworkversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/network/qtnetworkversion.h
|
||||
|
||||
include(access/access.pri)
|
||||
include(bearer/bearer.pri)
|
||||
|
@ -17,7 +17,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtopenglversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/opengl/qtopenglversion.h
|
||||
|
||||
contains(QT_CONFIG, opengl):CONFIG += opengl
|
||||
contains(QT_CONFIG, opengles1):CONFIG += opengles1
|
||||
|
@ -19,7 +19,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
|
||||
|
||||
include(../qbase.pri)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtplatformsupportversion.h
|
||||
HEADERS += $$PWD/qtplatformsupportversion.h
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
|
||||
|
@ -13,7 +13,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtprintsupportversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/printsupport/qtprintsupportversion.h
|
||||
|
||||
QMAKE_LIBS += $$QMAKE_LIBS_PRINTSUPPORT
|
||||
|
||||
|
@ -15,7 +15,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtsqlversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/sql/qtsqlversion.h
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
|
||||
|
@ -76,7 +76,7 @@ mac {
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qttestversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/testlib/qttestversion.h
|
||||
|
||||
QMAKE_TARGET_PRODUCT = QTestLib
|
||||
QMAKE_TARGET_DESCRIPTION = Qt \
|
||||
|
@ -13,7 +13,7 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
|
||||
|
||||
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
|
||||
|
||||
HEADERS += $$OUT_PWD/qtwidgetsversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/widgets/qtwidgetsversion.h
|
||||
|
||||
include(../qbase.pri)
|
||||
|
||||
|
@ -14,7 +14,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$OUT_PWD/qtxmlversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/xml/qtxmlversion.h
|
||||
|
||||
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user