Date: Wed, 18 Nov 2015 19:53:19 -0800 From: "Simon J. Gerraty" <sjg@juniper.net> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: <src-committers@FreeBSD.org>, <svn-src-all@FreeBSD.org>, <svn-src-head@FreeBSD.org>, <sjg@juniper.net> Subject: Re: svn commit: r288966 - head/share/mk Message-ID: <15117.1447905199@chaos> In-Reply-To: <564D29A0.6040000@FreeBSD.org> References: <201510070032.t970WYvU099368@repo.freebsd.org> <56146B4E.5040401@FreeBSD.org> <24053.1444240925@chaos> <56155FE0.7020809@FreeBSD.org> <564D29A0.6040000@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
Bryan Drewery <bdrewery@FreeBSD.org> wrote:
> As for the actual change in local.autodep.mk, I don't think it is needed
> or right since bsd.lib.mk and bsd.prog.mk already do exactly the same
> thing via ${OBJS}: ${SRCS:M*.h} if .depend is not yet generated. This
> does work in meta mode as I ran into a failure due to it before r291046
> (I had removed the libbfd/Makefile.depend.host for other testing). It's
> also hooked in far too late and orthogonally to the OBJS in the graph
> that need the headers.
Forgive me; what is "it" in the last sentence?
It is never too late to add a dependency.
It can easily be too late to add a value to a variable - to affect
dependencies.
Eg.
goo: ${OBJS}
echo OBJS=${OBJS}
OBJS+= foo.c
will not behave as 99% of readers assume.
foo.c being newer than goo, will not cause the target to be updated
because in goo: ${OBJS} OBJS is evaluated as the line is read.
Whereas echo OBJS=${OBJS} is evaluated when the script is run which is
much later in the game.
OBJS+= foo.c
goo: foo.c
would be correct fwiw.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15117.1447905199>
