Subject: Re: obj dir not created (subdir sendmail/cf/cf)
To: Jachym Holecek <freza@liberouter.org>
From: None <tlaronde@polynum.com>
List: tech-toolchain
Date: 06/20/2005 18:04:49
Hello,
On Mon, Jun 20, 2005 at 05:18:16PM +0200, Jachym Holecek wrote:
>
> not having much context, but:
>
> > # $NetBSD: Makefile,v 1.284.2.1 2004/07/28 21:35:29 jmc Exp $
> > MAKEDEV: .EXEC
> > ${_MKTARGET_CREATE}
> > MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
> > NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
> > awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
> >
> > where, IMHO, it should be:
> >
> > --- /usr/src/etc/Makefile 2005-06-19 18:16:11.000000000 +0200
> > +++ /var/tmp/Makefile.mod 2005-04-15 16:53:36.000000000 +0200
> > @@ -155,7 +155,8 @@
> > ${_MKTARGET_CREATE}
> > MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
> > NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
> > - awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
> > + awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
> > + > ${MAKEOBJDIRPREFIX}/${.TARGET}
>
> Wrong. You probably meant ${.OBJDIR} there, which is pointless since
> the rule's PWD will already be equal .OBJDIR, iff either MAKEOBJDIRPREFIX
> is set or MAKEOBJDIR is set or ${.CURDIR}/obj[.${MACHINE}] exists. One
> of these conditions should be satisfied after a 'make obj' pass.
Well, last time I try to track down how things were supposed to behave,
I concluded (I may be totally or partially wrong):
1) The Makefiles are called from the source dir;
2) ${.CURDIR} is hence the source dir;
3) ${.TARGET} is the same as POSIX classical $@ and expands just to
the given target, no obj stuff being prepended;
=> so MAKEDEV is generated in the srcdir, when it is supposed---from
ETC_INSTALL_OBJ---to be generated in .OBJDIR
For one reason I don't remember at the moment, changing MAKEOBJDIRPREFIX
by .OBJDIR was not giving the correct result (file was not generated in
the correct place).
Regards,
--
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/ | http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C