[Interest] Buggy Makefile for config.tests\arch?
Gisle Vanem
gvanem at broadpark.no
Thu Feb 14 10:39:50 CET 2013
"Joerg Bornemann" <joerg.bornemann at digia.com> wrote:
> Even if the file does not exist, del won't set ERRORLEVEL.
> Try this Makefile:
>
> first:
> del thisdoesnotexist
> echo still working...
>
> Does del return with an exit code != 0 on your system?
It sure does (as it should IMHO). I use 4NT 5.0U.
nmake -nologo:
del thisdoesnotexist
4NT: (Sys) Systemet finner ikke angitt fil. <<< ERROR_FILE_NOT_FOUND = 2
"C:\TEMP\tmp\thisdoesnotexist"
0 files deleted
NMAKE : fatal error U1077: 'del' : return code '0x2'
Stop.
------
But cmd doesn't set errorlevel. cmd /c nmake -nologo
del thisdoesnotexist
Finner ikke C:\TEMP\tmp\thisdoesnotexist
echo still working...
still working...
But modifying my shell-win32.conf doesn't seems to help;
The "del" command there isn't used in all places by qmake.
> So only that config test barfs up and Qt builds fine after this?
No. I expect the whole build of Qt5 three to break. I'm sticking to
Qt 4.8.2 that works with my shell (with some tweaking of some .conf-
files).
PS. The 4NT docs on "ERRORLEVEL" says:
Various implementations of Microsoft's CMD.EXE also set ERRORLEVEL
for some but not all internal commands. Our products attempt to emulate
that behavior, but...
My emphasis on "not all internal commands".
Not sure I can turn off errorlevel or OS-error codes for "del". A fix for
me is to use:
alias del=rm -f
--gv
More information about the Interest
mailing list