On 6/13/2016 8:18 PM, Simon J. Gerraty wrote:
> Bryan Drewery <bdrew...@freebsd.org> wrote:
>>>> ${_FIRM}: ${.CURDIR}/../../../../contrib/dev/drm2/radeonkmsfw/${_FIRM}.uu
>>>>         uudecode -p $? > ${.TARGET}
> Targets like this that use $? or ${.OODATE} are a bad fit with META mode.
> If the normal make rules think the target is up to date, .OODATE will be
> empty, thus if meta_oodate says the target is out-of-date, the script
> will run with no args - because $? expands to nothing.
> So either the use of $? should be replaced with ${.ALLSRC} or something
> else that will be consistent, or the target should be marked .NOMETA

I think my point is getting lost.  With the new missing-meta feature, if
a target uses .OODATE and has no .meta file then it is forced to run
*Even if no targets are out-of-date* and yields an empty result.

Yet, via meta_oodate, if there is already a .meta file and .OODATE is
used and has an empty source list then $.OODATE is forced to be .ALLSRC:

> if (oodate && needOODATE) {                                           
>     /*                                                                
>      * Target uses .OODATE which is empty; or we wouldn't be here.    
>      * We have decided it is oodate, so .OODATE needs to be set.      
>      * All we can sanely do is set it to .ALLSRC.                     
>      */                                                               
>     Var_Delete(OODATE, gn);                                           
>     Var_Set(OODATE, Var_Value(ALLSRC, gn, &cp), gn, 0);               
>     free(cp);                                                         
> }                                                                     

What's missing is setting of needOODATE in the metaMissing case so that
it auto applies the .OODATE=.ALLSRC hack/fixup which is what you're
suggesting as well.

I don't think it is right to force manually adding .NOMETA to all
.OODATE usages since there's already logic to handle .OODATE in the
.meta existing case.

Bryan Drewery

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to