diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-03 18:12:52 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-06 16:34:17 +0000 |
commit | 4adc1012e19f5e12ab2fb96effc9ea88d2a05eda (patch) | |
tree | 585b19485d52f94295adc64c08bed44a95a11f8d /qmake/library/qmakeevaluator.cpp | |
parent | ad51c8aa0a00c1bbec7386472ca454079e284051 (diff) |
add a bunch of complementary options to -after
in particular, -before (just for symmetry, as it's the default), -early
(the actual objective), and -late (for symmetry again).
Change-Id: I274303582a348b052c3e5106ff360ab4fd7d4ee2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 38c0cec23f..a5fa0d22a6 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1443,6 +1443,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if (flags & LoadPreFiles) { setupProject(); + if (!m_option->extra_cmds[QMakeEvalEarly].isEmpty()) + evaluateCommand(m_option->extra_cmds[QMakeEvalEarly], fL1S("(command line -early)")); + for (ProValueMap::ConstIterator it = m_extraVars.constBegin(); it != m_extraVars.constEnd(); ++it) m_valuemapStack.first().insert(it.key(), it.value()); @@ -1454,8 +1457,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if ((vr = evaluateFeatureFile(QLatin1String("default_pre.prf"))) == ReturnError) goto failed; - if (!m_option->precmds.isEmpty()) { - evaluateCommand(m_option->precmds, fL1S("(command line)")); + if (!m_option->extra_cmds[QMakeEvalBefore].isEmpty()) { + evaluateCommand(m_option->extra_cmds[QMakeEvalBefore], fL1S("(command line)")); // Again, after user configs, to override them applyExtraConfigs(); @@ -1468,7 +1471,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( debugMsg(1, "done visiting file %s", qPrintable(pro->fileName())); if (flags & LoadPostFiles) { - evaluateCommand(m_option->postcmds, fL1S("(command line -after)")); + evaluateCommand(m_option->extra_cmds[QMakeEvalAfter], fL1S("(command line -after)")); // Again, to ensure the project does not mess with us. // Specifically, do not allow a project to override debug/release within a @@ -1478,6 +1481,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if ((vr = evaluateFeatureFile(QLatin1String("default_post.prf"))) == ReturnError) goto failed; + if (!m_option->extra_cmds[QMakeEvalLate].isEmpty()) + evaluateCommand(m_option->extra_cmds[QMakeEvalLate], fL1S("(command line -late)")); + if ((vr = evaluateConfigFeatures()) == ReturnError) goto failed; } |