summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-20 15:38:43 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:39:57 +0200
commitd8e6c49bfafaa69a0bd4a36c8a8c9684a832a646 (patch)
tree6d619ac15a153f2d034ec7581cb44ab440174a0d /qmake/project.cpp
parentf97913f2da5b4c46056b7d16ca30a3ae7874bbf7 (diff)
add $$native_path() function
more or less QDir::toNativeSeparators(QDir::cleanPath()) Change-Id: I52deee1e8086559eda5833b387a0cf64d21cbcd9 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 88d55aef7f..d4065a1450 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -82,7 +82,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_VAL_ESCAPE, E_REPLACE,
E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS, E_ENUMERATE_VARS,
- E_SHADOWED, E_CLEAN_PATH };
+ E_SHADOWED, E_CLEAN_PATH, E_NATIVE_PATH };
QHash<QString, ExpandFunc> qmake_expandFunctions()
{
static QHash<QString, ExpandFunc> *qmake_expand_functions = 0;
@@ -121,6 +121,7 @@ QHash<QString, ExpandFunc> qmake_expandFunctions()
qmake_expand_functions->insert("enumerate_vars", E_ENUMERATE_VARS);
qmake_expand_functions->insert("shadowed", E_SHADOWED);
qmake_expand_functions->insert("clean_path", E_CLEAN_PATH);
+ qmake_expand_functions->insert("native_path", E_NATIVE_PATH);
}
return *qmake_expand_functions;
}
@@ -2584,6 +2585,13 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
else
ret += QDir::cleanPath(args.at(0));
break;
+ case E_NATIVE_PATH:
+ if (args.count() != 1)
+ fprintf(stderr, "%s:%d native_path(path) requires one argument.\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ else
+ ret += Option::fixPathToTargetOS(args.at(0), false);
+ break;
default: {
fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
parser.file.toLatin1().constData(), parser.line_no,