Add $(EXE) suffix to executables in Makefiles#5564
Add $(EXE) suffix to executables in Makefiles#5564vtjnash wants to merge 1 commit intoOpenMathLib:developfrom
Conversation
Define EXE variable in Makefile.system (set to .exe on Windows, empty otherwise) and update all test executables to use it for Windows compatibility. - Makefile.system: Add EXE variable definition - test/Makefile: Update all executables with $(EXE) suffix - ctest/Makefile: Update all executables with $(EXE) suffix - utest/Makefile: Update UTESTBIN and UTESTEXTBIN with $(EXE) suffix - Makefile.install: Update install_tests target with $(EXE) suffix - .gitignore: Add *.exe pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a133637 to
7414e36
Compare
|
The |
|
The make binary doesn't (couldn't?) do this anywhere ever, since it doesn't know that the rule will produce an executable file. The linker usually does automatically add the suffix, but it means the rules in the make binary don't end up producing the files that was specified in the Makefile to be made by that rule, which can cause https://sourceware.org/binutils/docs-2.20/ld/Options.html
|
|
I guess the customary name for this is EXEEXT if you prefer autotools conventions |
|
Bump? |
|
I'm not sure I understand which combination of compiler and operating system actually needs this ? |
|
Any use targeting Windows requires this for correctness. The compiler has a hack that makes it partly work even when your makefile has this bug, but it is awkward to be specifying that it builds the wrong file name |
|
bump? You do not get this "for free" with the make binary, only with automake, and only for the build rules, not all of the other uses, but you aren't using automake anyways: https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html |
|
Without this, the output being literally specified never actually gets built, since the compiler always forces an added extension of |
|
bump? |
Define EXE variable in Makefile.system (set to .exe on Windows,
empty otherwise) and update all test executables to use it for
Windows compatibility.
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com