Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jul 2004 13:37:08 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Will Andrews <will@csociety.org>, FreeBSD ports <ports@FreeBSD.org>
Subject:   Re: Why does bsd.port.mk override make's search for Makefiles...?
Message-ID:  <40EED7C4.8090707@mac.com>
In-Reply-To: <20040709165614.GV75771@sirius.firepipe.net>
References:  <677C3B7A-D175-11D8-8006-00039312D914@fillmore-labs.com> <40EECC32.2040805@mac.com> <20040709165614.GV75771@sirius.firepipe.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Will Andrews wrote:
> On Fri, Jul 09, 2004 at 12:47:46PM -0400, Chuck Swiger wrote:
>>.if defined(MAKEFILE)
>>MAKE_FLAGS?=    -f ${MAKEFILE}
>>.endif 
> 
> You did not read the PR referenced.  We're completely serious.

Hmm, you're right.  OK, I am more literate now, and I believe I understand the 
problem mentioned in the PR, I'm just not sure I agree with renaming MAKEFILE 
to MAKE_FILE everywhere.

"man make" doesn't seem to document that variable being used:

ENVIRONMENT
      The make utility uses the following environment variables, if they exist:
      MACHINE, MAKE, MAKEFLAGS, MAKEOBJDIR, MAKEOBJDIRPREFIX, and PWD.

...and GNU make seems to prefer MAKEFILES instead (from "info make"):

The Variable `MAKEFILES'
========================

    If the environment variable `MAKEFILES' is defined, `make' considers
its value as a list of names (separated by whitespace) of additional
makefiles to be read before the others.  This works much like the
`include' directive: various directories are searched for those files
(*note Including Other Makefiles: Include.).  In addition, the default
goal is never taken from one of these makefiles and it is not an error
if the files listed in `MAKEFILES' are not found.

    The main use of `MAKEFILES' is in communication between recursive
invocations of `make' (*note Recursive Use of `make': Recursion.).  It
usually is not desirable to set the environment variable before a
top-level invocation of `make', because it is usually better not to
mess with a makefile from outside.  However, if you are running `make'
without a specific makefile, a makefile in `MAKEFILES' can do useful
things to help the built-in implicit rules work better, such as
defining search paths (*note Directory Search::).

	---------

...so which standard do we want to choose from?  :-)  Does POSIX say anything 
(useful) about what make should do with regard to $MAKEFILE...?

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40EED7C4.8090707>