On Fri, Oct 07, 2016 at 09:03:40AM -0400, Dario Niedermann wrote:
> >Synopsis: make: empty expansion of $(<D) and $(<F)
> >Category: user
> >Environment:
> System : OpenBSD 5.8
> Details : OpenBSD 5.8 (GENERIC.MP) #1: Wed Oct 14 19:40:42 CEST 2015
>
> [email protected]:/binpatchng/work-binpatch58-i386/src/sys/arch/i386/compile/GENERIC.MP
>
> Architecture: OpenBSD.i386
> Machine : i386
> >Description:
> I'm having a problem with OpenBSD's make, where the local
> variables $(<D) and $(<F) expand to empty. This is the rule that's
> misbehaving:
>
> .c.o:
> cd $(<D) && $(CC) $(cflags) -c $(<F)
>
> Nothing in make's man page leads me to think an empty expansion would be
> expected. The same rule works on GNU and NetBSD makes.
>
> Now, this was observed on OpenBSD 5.8, but a search for the changes and
> fixes between that version and 6.0 doesn't show any changes for make.
>
I've committed a fix for this to CVS:
CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2016/10/14 03:27:21
Modified files:
usr.bin/make : Makefile generate.c var.c var.h
Log message:
Implement the ${<D} and ${<F} variables, as documented in the manual.
They are equivalent to ${<:H} and ${<:T} repectively, however the former
variants are more portable, as they are understood by GNU, FreeBSD and
NetBSD make too.
absence of those variables reported by Dario Niedermann <dnied at
tiscali.it>
ok millert espie
You can get the updated make like this
$ cd /usr/src/usr.bin/make
$ cvs up
$ make clean; make obj; make depend; make
# make install
Have fun ${<D}'ing. :)
natano