summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/win32')
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp17
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp21
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp17
3 files changed, 53 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp
index 1f42bec..35966b7 100644
--- a/qmake/generators/win32/msvc_dsp.cpp
+++ b/qmake/generators/win32/msvc_dsp.cpp
@@ -682,7 +682,7 @@ void DspMakefileGenerator::writeSubDirs(QTextStream &t)
QString profile = tmp;
if(!profile.endsWith(Option::dir_sep))
profile += Option::dir_sep;
- profile += fi.baseName() + ".pro";
+ profile += fi.baseName() + Option::pro_ext;
subdirs.append(profile);
} else {
QMakeProject tmp_proj;
@@ -1123,6 +1123,20 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file
fileOut);
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
if(config->canExecute(dep_cmd)) {
+#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32)
+ QPopen procPipe;
+ if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) {
+ QString indeps;
+ while(true) {
+ int read_in = procPipe.fread(buff, 255);
+ if ( !read_in )
+ break;
+ indeps += QByteArray(buff, read_in);
+ }
+ if(!indeps.isEmpty())
+ step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
+ }
+#else
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -1135,6 +1149,7 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file
if(!indeps.isEmpty())
step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
}
+#endif
}
}
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index dd5ea20..4dda30c 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2215,6 +2215,26 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
Option::fixPathToLocalOS(inFile, true, false),
out);
if(Project->canExecute(dep_cmd)) {
+#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32)
+ QPopen procPipe;
+ if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) {
+ QString indeps;
+ while(true) {
+ int read_in = procPipe.fread(buff, 255);
+ if ( !read_in )
+ break;
+ indeps += QByteArray(buff, read_in);
+ }
+ if(!indeps.isEmpty()) {
+ QStringList extradeps = indeps.split(QLatin1Char('\n'));
+ for (int i = 0; i < extradeps.count(); ++i) {
+ QString dd = extradeps.at(i).simplified();
+ if (!dd.isEmpty())
+ deps += Project->fileFixify(dd);
+ }
+ }
+ }
+#else
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -2233,6 +2253,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
}
}
}
+#endif
}
}
for (int i = 0; i < deps.count(); ++i)
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 2b0ce28..7d32dab 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -495,7 +495,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
QString profile = tmp;
if(!profile.endsWith(Option::dir_sep))
profile += Option::dir_sep;
- profile += fi.baseName() + ".pro";
+ profile += fi.baseName() + Option::pro_ext;
subdirs.append(profile);
} else {
QMakeProject tmp_proj;
@@ -1424,6 +1424,20 @@ void VcprojGenerator::initResourceFiles()
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
if(canExecute(dep_cmd)) {
+#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32)
+ QPopen procPipe;
+ if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) {
+ QString indeps;
+ while(true) {
+ int read_in = procPipe.fread(buff, 255);
+ if ( !read_in )
+ break;
+ indeps += QByteArray(buff, read_in);
+ }
+ if(!indeps.isEmpty())
+ deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
+ }
+#else
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -1436,6 +1450,7 @@ void VcprojGenerator::initResourceFiles()
if(!indeps.isEmpty())
deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
}
+#endif
}
}
vcProject.ResourceFiles.addFiles(deps);