OK, but how is the make.exe you produced built?
I actually did what you suggested but was somewhat confused with the
result. Usually I do this with 'ldd', but both msvcrt.dll and ucrtbase.dll
show up in 'ldd make.exe' output, and I wasn't sure what to think of it.
However, your approach with objdump gives fewer results and only
lists msvcrt.dll, not ucrtbase.dll:
C:\Users\cargyris\temp>objdump -p make.exe | grep "DLL Name:"
DLL Name: ADVAPI32.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
DLL Name: USER32.dll
So I guess MSVCRT is enough, i.e. no need for UCRT.
If you try using in a Makefile file names with non-ASCII
characters outside of the current ANSI codepage, does Make succeed to
recognize files mentioned in the Makefile whose letter-case is
different from what is seen in the file system?
I think it does, here is the experiment:
C:\Users\cargyris\temp>ls ❎
src.c
There is only src.c in that folder.
Makefile
utf8.mk is UTF-8 encoded and has this content that
checks for the existence of:
❎\src.c
❎\src.C
❎\src.cs
where ❎ is outside the ANSI codepage (1252).
If I understand this correctly, both src.c and src.C should be found,
but not src.cs (just to show a negative case as well).
hello :
@gcc ©\src.c -o ©\src.exe
ifneq ("$(wildcard ❎\src.c)","")
@echo ❎\src.c exists
else
@echo ❎\src.c does NOT exist
endif
ifneq ("$(wildcard ❎\src.C)","")
@echo ❎\src.C exists
else
@echo ❎\src.C does NOT exist
endif
ifneq ("$(wildcard ❎\src.cs)","")
@echo ❎\src.cs exists
else
@echo ❎\src.cs does NOT exist
endif
Here is the result of running the UTF-8-patched Make on it:
C:\Users\cargyris\temp>make.exe -f
utf8.mk❎\src.c exists
❎\src.C exists
❎\src.cs does NOT exist
I don't know if that was a good way to test your point, feel free to suggest
a different one if it was not. It seems to be doing the right thing, finding
the .C file as well.
Indeed. But build_w32.bat is a very simple batch file, so I don't
think modifying it will present any difficulty. Let us know if you
need help in that matter.
Sure, thanks.
Btw, there's one aspect where Make on MS-Windows will probably fall
short of modern Posix systems: the display of non-ASCII characters on
the screen.
Indeed, some thoughts on that:
1) As you know, this is only affecting the visual aspect of the logs, not the
inner workings of Make. This could confuse users because they would
be seeing "errors" on the screen, without there being any real errors.
Perhaps a mention in the doc or release notes could remedy that.
2) To some extent (maybe even completely, I don't know) this can be
mitigated with using PowerShell instead of the classic Command Prompt.
This seems to be working in this case at least:
Command Prompt:
C:\Users\cargyris\temp>make.exe -f
utf8.mkecho â?Z\src.c exists
PowerShell:
PS C:\Users\cargyris\temp> make.exe -f
utf8.mkecho ❎\src.c exists
If anything, it could be worth a mention in the doc.