summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-08-18 11:44:27 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-08-23 13:52:55 +0200
commit82d5f0ae622d2579b925a5f6a8054eeeccb9a233 (patch)
treea27709aecb8d209180c9be497124ad004f6f2c25 /tests/auto/qmake
parent2d60953c4664958c665114c52ce2b92ed11b1488 (diff)
add indirect input/output specification capability to QMAKE_SUBSTITUTES
like in SUBDIRS, the specified strings can now be basenames of "structures" which specify the actual input and output files: QMAKE_SUBSTITUTES += test test.input = infile.txt.in test.output = foobar.out Reviewed-by: joerg
Diffstat (limited to 'tests/auto/qmake')
-rw-r--r--tests/auto/qmake/testdata/substitutes/test.pro6
-rw-r--r--tests/auto/qmake/testdata/substitutes/test3.txt1
-rw-r--r--tests/auto/qmake/tst_qmake.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/qmake/testdata/substitutes/test.pro b/tests/auto/qmake/testdata/substitutes/test.pro
index ddad93f697..26b02722e8 100644
--- a/tests/auto/qmake/testdata/substitutes/test.pro
+++ b/tests/auto/qmake/testdata/substitutes/test.pro
@@ -1 +1,5 @@
-QMAKE_SUBSTITUTES += test.in sub/test2.in
+QMAKE_SUBSTITUTES += test.in sub/test2.in indirect
+
+indirect.input = $$PWD/test3.txt
+indirect.output = $$OUT_PWD/sub/indirect_test.txt
+
diff --git a/tests/auto/qmake/testdata/substitutes/test3.txt b/tests/auto/qmake/testdata/substitutes/test3.txt
new file mode 100644
index 0000000000..ce01362503
--- /dev/null
+++ b/tests/auto/qmake/testdata/substitutes/test3.txt
@@ -0,0 +1 @@
+hello
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
index 060fa0127b..277e9f8b46 100644
--- a/tests/auto/qmake/tst_qmake.cpp
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -484,12 +484,14 @@ void tst_qmake::substitutes()
QVERIFY( test_compiler.qmake( workDir, "test" ));
QVERIFY( test_compiler.exists( workDir, "test", Plain, "" ));
QVERIFY( test_compiler.exists( workDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( workDir, "sub/indirect_test.txt", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( workDir ));
QString buildDir = base_path + "/testdata/substitutes_build";
QVERIFY( test_compiler.qmake( workDir, "test", buildDir ));
QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" ));
QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( buildDir, "sub/indirect_test.txt", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( buildDir ));
}