Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: Ensure that recursive QMAKE_EXTRA_TARGETS use the correct makefile
This commit is contained in:
commit
cdd524ea97
@ -2647,10 +2647,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
QString out_directory_cdin, out_directory_cdout;
|
||||
MAKE_CD_IN_AND_OUT(out_directory);
|
||||
|
||||
//don't need the makefile arg if it isn't changed
|
||||
QString makefilein;
|
||||
if(subtarget->makefile != "$(MAKEFILE)")
|
||||
makefilein = " -f " + subtarget->makefile;
|
||||
QString makefilein = " -f " + subtarget->makefile;
|
||||
|
||||
//write the rule/depends
|
||||
if(flags & SubTargetOrdered) {
|
||||
|
3
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
vendored
Normal file
3
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
int main(int,char**)
|
||||
{
|
||||
}
|
5
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/simple/simple.pro
vendored
Normal file
5
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/simple/simple.pro
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
TEMPLATE = app
|
||||
SOURCES = main.cpp
|
||||
|
||||
extratarget.commands = @echo extra target worked OK
|
||||
QMAKE_EXTRA_TARGETS += extratarget
|
7
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/subdir.pro
vendored
Normal file
7
tests/auto/qmake/testdata/subdir_via_pro_file_extra_target/subdir.pro
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = simple
|
||||
|
||||
extratarget.CONFIG = recursive
|
||||
extratarget.recurse = $$SUBDIRS
|
||||
extratarget.recurse_target = extratarget
|
||||
QMAKE_EXTRA_TARGETS += extratarget
|
@ -0,0 +1,7 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = subdir.pro
|
||||
|
||||
extratarget.CONFIG = recursive
|
||||
extratarget.recurse = $$SUBDIRS
|
||||
extratarget.recurse_target = extratarget
|
||||
QMAKE_EXTRA_TARGETS += extratarget
|
@ -69,6 +69,7 @@ private slots:
|
||||
void simple_lib();
|
||||
void simple_dll();
|
||||
void subdirs();
|
||||
void subdir_via_pro_file_extra_target();
|
||||
void functions();
|
||||
void operators();
|
||||
void variables();
|
||||
@ -234,6 +235,19 @@ void tst_qmake::subdirs()
|
||||
QVERIFY( test_compiler.removeMakefile( workDir ) );
|
||||
}
|
||||
|
||||
void tst_qmake::subdir_via_pro_file_extra_target()
|
||||
{
|
||||
QString workDir = base_path + "/testdata/subdir_via_pro_file_extra_target";
|
||||
|
||||
QDir D;
|
||||
D.remove( workDir + "/Makefile");
|
||||
D.remove( workDir + "/Makefile.subdir");
|
||||
D.remove( workDir + "/simple/Makefile");
|
||||
D.remove( workDir + "/simple/Makefile.subdir");
|
||||
QVERIFY( test_compiler.qmake( workDir, "subdir_via_pro_file_extra_target" ));
|
||||
QVERIFY( test_compiler.make( workDir, "extratarget" ));
|
||||
}
|
||||
|
||||
void tst_qmake::functions()
|
||||
{
|
||||
QString workDir = base_path + "/testdata/functions";
|
||||
|
Loading…
Reference in New Issue
Block a user