D14731: Use "gmake" command in custommake plugin on FreeBSD. Fixes unit test.
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Fri Aug 10 15:08:17 BST 2018
kossebau added a comment.
Yay for more unit test fixes :)
Though... why does this change fix the unit test exactly? Without knowing more details, I am surprised that one cannot use the normal "make". "gmake" does not occur elsewhere as string, so why is this needed here, and why not elsewhere as well (not sure if there are other direct calls of the "make" tool).
Does the call rely on some GNU make features? If so, that should be added at least as comment in the code, so it is clear why plain "make" does not work.
Also, is "gmake" part of the normal FreeBSD system? Or would we need to check first this exists in the runtime?
INLINE COMMENTS
> makefileresolver.cpp:98
> QString relativeFile = Path(workingDirectory).relativePath(Path(absoluteFile));
> - return "make -k --no-print-directory -W \'" + absoluteFile + "\' -W \'" + relativeFile + "\' -n " + makeParameters;
> + QString make = QLatin1String("make");
> +#ifdef Q_OS_FREEBSD
Type of `make` could be QLatin1String as well, given below in the concatenation QStringBuilder happily deals with QLatin1Strings, saves us one conversion/malloc at runtime.
> makefileresolver.cpp:100
> +#ifdef Q_OS_FREEBSD
> + make = QLatin1String("gmake");
> +#endif
The reassignment looks strange, IMHO would be better to do
#ifdef Q_OS_FREEBSD
// on FreeBSD gmake is needed because foobar
const QLatin1String makeExe("gmake");
#else
const QLatin1String makeExec("make");
#endif
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D14731
To: arrowd, #kdevelop
Cc: kossebau, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180810/13205245/attachment.html>
More information about the KDevelop-devel
mailing list