How to get the Makefile path?

[email protected]
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
Hi all,

    I need to get the path to the Makefile being processed by the make
executable. I tried to use the $(MFLAGS) variable for that, but it
ignores the -f switch. Look this test:

% cat  /home/me/Makefile
all:
	@echo MAKEFLAGS=$(MAKEFLAGS)
	@echo MFLAGS=$(MFLAGS)
	@echo MAKECMDGOALS=$(MAKECMDGOALS)

% make -nf /home/me/Makefile all
echo MAKEFLAGS=n
echo MFLAGS=-n
echo MAKECMDGOALS=all

   Any help will be appreciated.

   Rgds

                               Walter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.