Subject: Re: bmake doesn't set MAKE correctly?
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 03/11/2003 18:02:13
"Simon J. Gerraty" <sjg@crufty.net> wrote:
> 
> >FWIW, it seems that this happens for packages that USE_GMAKE.  So maybe
> >MAKE_PROGRAM and MAKE conflict?
> 
> Ah, that's a good area to look at - generally you need to take care 
> to not propagate $MAKE from bmake to gmake environments - else 
> bad things can happen.  So your problem may well relate to this.
> Though why you only see it on certain platforms is "interesting".

Well, it seems that autoconf/automake also plays a role in this.
When I run  'bmake' in mail/mutt, it configures everything properly, and
then starts to build it.  It follows the first dependencies of the
Makefile (namelely the one that says to create Makefile from Makefile.in
using automake).

I inserted some debugging statement and found:

===> Building for mutt-1.4nb3
/sbin/sed -e "s|@PREFIX@|/usr/pkg|g"  -e
"s|@PKG_SYSCONFDIR@|/usr/pkg/etc|g"  <
/usr/pkgsrc/mail/mutt/work/mutt-1.4/doc/mutt.man.in >
/usr/pkgsrc/mail/mutt/work
/mutt-1.4/doc/mutt.man
./gen_defs ./OPS ./OPS.PGP > keymap_defs.h
./patchlist.sh < ./PATCHES > patchlist.c
echo "MAKE= BUILDLINK_PREFIX.gettext=/usr/pkg
BUILDLINK_PREFIX.ncurses=/usr/pkg
BUILDLINK_PREFIX.openssl=/usr/pkg DIGEST=/usr/pkg/bin/digest
DIGEST_VERSION=2002
1220 LOWER_OPSYS=irix6 OPSYS=IRIX OS_VERSION=6.5
PKGTOOLS_VERSION=20030202"
MAKE= BUILDLINK_PREFIX.gettext=/usr/pkg
BUILDLINK_PREFIX.ncurses=/usr/pkg BUILDL
INK_PREFIX.openssl=/usr/pkg DIGEST=/usr/pkg/bin/digest
DIGEST_VERSION=20021220 L
OWER_OPSYS=irix6 OPSYS=IRIX OS_VERSION=6.5 PKGTOOLS_VERSION=20030202
echo "MAKE_PROGRAM="
MAKE_PROGRAM=
echo "GMAKE="
GMAKE=
cd . \
  && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/ksh ./config.status


So, we find that MAKE is set to what looks like a partial MAKE_ENV
rather than to a single program.

I'll debug this further some time this week, but if anybody else has
insights they'd like to share... :)

-Jan

-- 
   It's psychosomatic. You need a lobotomy. I'll get a saw.
		  -- Calvin