overwiew
I want to use nmake on windows however got stuck with ifeq not being supported to achieve something I am trying to get. OS detecting makefile
workaround
To workaround the ifeq incompatibility, I decided to use $(OS) attribute.
include platf/$(OS)_make
- windows it is supposed to include platf/Windows_NT_make
- other platforms where $(OS) returns "", so uses file platf/_make
Directory layout
| Makefile
+---platf
| Makefile.linux
| Makefile.macos
| Makefile.win
| Windows_NT_make
| _make
problem
- _make, I have the same routine from OS detecting makefile and include Makefile for linux, or mac etc
- Windows_NT_make includes Makefile.win
This works like charm, except windows again.
#1 If the file platf/Windows_NT_make IS present, it complains with
makefile(4) : fatal error U1052: file 'platf/$(OS)_make' not found
#2 If the file platf/Windows_NT_make IS NOT present, it complains with
makefile(4) : fatal error U1052: file 'platf/Windows_NT_make' not found
Question
So, if nmake is able to decide what would be the value of $(OS) is (seen from #2), why it complains with #1