From: Ubuntu guy on
Hi,

I'm working on a big project with a lot many number of Makefiles
specified for respective modules. To generate the build, i just issue,
make.

I would like to see as to which Makefile is picked up by make
utility. Is there anyway to find this without any idea about
individual Makefiles?
From: Gordon Burditt on
> I'm working on a big project with a lot many number of Makefiles
>specified for respective modules. To generate the build, i just issue,
>make.
>
> I would like to see as to which Makefile is picked up by make
>utility. Is there anyway to find this without any idea about
>individual Makefiles?

Read the documentation provided by your version of "make".

"make" on FreeBSD looks for BSDMakefile, makefile, and Makefile,
in that order (using the first one it finds), unless this is
overridden with the -f flag. Each file is searched for in the
current directory, the object directory, and then any directories
specified with the -I flag.

GNU make looks for GNUMakefile, makefile, and Makefile, in that order,
unless this is overridden with the -f flag.

Included makefiles depend on what's in the makefile doing the including.