Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
Qt Creator 7.0.2
-
None
-
4635d90158 (qt-labs/jom/master)
Description
This works in nmake but not in jom:
test: C:\some\path\*.txt
echo "$**"
# Shows empty quotes "" in jom. Doesn't depend on any of those targets either.
These work fine:
test: .\some\path\*.txt echo "$**" test: C:\some\path\ExactFilename.txt echo "$**"
The problem is in src/jomlib/parser.cpp. expandWildcards() assumes that all paths are relative and appends current dir to the left indiscriminately:
dependents = expandWildcards(m_makefile->dirPath(), dependents); static QStringList expandWildcards(const QString &dirPath, const QStringList &lst) { ... QString path = dirPath; int idx = str.lastIndexOf(QLatin1Char('/')); if (idx != -1) { path += QLatin1Char('/') + str.left(idx); str.remove(0, idx + 1); } .... }
It should check for isAbsolutePath() or call QDir(dirPath)::makeAbsolute(str.left(idx)).