Re: GNU Make Windows: absolute path to the file that contains the Make file that is currently being interpreted by Make.
> From: Denis BEURIVE <[hidden email]>
> Date: Fri, 30 Sep 2016 23:15:42 +0200
> I use to use GNU Make under UNIX, but (unfortunately), I have to work under
> Windows. This is not my cup of tea… and I have the MSDOS, which is a
> prehistoric tool. However, I have no choice.
What do you mean by "I have the MSDOS"? Are you using MSDOS tools on
Windows? Or does it mean something else?
> Under UNIX, I use to use this construct in order to get the absolute path
> to the file that contains the Make file that is currently being interpreted
> by Make :
> __DIR__ := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
> This works fine under UNIX.
> However, under Windows, it does not work… The result is totally unexpected.
What is the version of GNU Make you have installed on the Windows
machine? With Make 4.2, the latest official release, your recipe
works for me. Here's how I tried this (where "^Z" means Ctrl-Z, the
Windows EOF character):