Subject: who reset MAKEFILE?
To: None <tech-pkg@NetBSD.org>
From: OBATA Akio <obata@lins.jp>
List: tech-pkg
Date: 04/10/2006 23:16:57
Hi,

In mk/bsd.pkg.mk

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
MAKEFILE?=              Makefile
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

And 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.PHONY: do-build
.if !target(do-build)
do-build:
.  for _dir_ in ${BUILD_DIRS}
        ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}                       \
        cd ${WRKSRC}; cd ${_dir_};                                      \
        ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS}       \
                -f ${MAKEFILE} ${BUILD_TARGET}
.  endfor
.endif
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Then, "make build" result in

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
env FOO=BAR ...... bmake -f Makefile ........
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

But in general,

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
% cd /var/tmp
% cat Makefile
MAKEFILE?=foo

all:
        @echo ${MAKEFILE}
% bmake all
/var/tmp/Makefile
% 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Not "foo" nor "Makefile" but "/var/tmp/Makefile"

By this rule, in pkgsrc do "make build" seems to be result in

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
env FOO=BAR ...... bmake -f /usr/pkgsrc/cat/pkg/Makefile ........
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

but not.

Who reset MAKEFILE?

--
"Of course I love NetBSD":-)
OBATA Akio / obata@lins.jp