Page MenuHomeFreeBSD

Update dirdeps.mk et al to latest
ClosedPublic

Authored by sjg on Jun 8 2018, 1:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 9:32 AM
Unknown Object (File)
Mon, Apr 29, 8:09 AM
Unknown Object (File)
Mon, Apr 29, 8:09 AM
Unknown Object (File)
Mar 23 2024, 5:31 PM
Unknown Object (File)
Mar 21 2024, 12:01 AM
Unknown Object (File)
Dec 20 2023, 3:11 AM
Unknown Object (File)
Nov 16 2023, 11:43 AM
Unknown Object (File)
Nov 3 2023, 10:58 PM

Details

Summary

dirdeps.mk and meta.autodep.mk will now look for
Makefile.depend.options
to handle optional dependencies, the work is all done by
dirdeps-options.mk

Also update to latest meta.stage.mk and gendirdeps.mk

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

share/mk/dirdeps.mk
750 ↗(On Diff #43442)

s/is/this/

751 ↗(On Diff #43442)

What kinds of logic would go in here?

I sent you a patch in the past that added some code to the condition on line 720 above that I'd like a hook for potentially. It was to handle the case of a missing Makefile.depend and just run some make -V LIBADD and such to make some guesses. It's worked well at Isilon for me. You didn't like the strategy but would you be willing to add some kind of hook?

.if !empty(_m)
# handle including existing Makefile.depend
.else # new proposed change from here for line 735 above
.-include <local.dirdeps-missing.mk>
.endif # old line 735 above moved down
share/mk/gendirdeps.mk
177 ↗(On Diff #43442)

Can you explain what this code goal is?

It used to take all of META_FILES but now it seems to only take *.meta from the list and the rest get ignored, and it seems to find *all* .meta files even if not wanted.

I've had to use META_XTRAS in some places in the build that this change makes me nervous about.

share/mk/bsd.crunchgen.mk:META_XTRAS+=  ${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh}
share/mk/bsd.crunchgen.mk:META_XTRAS+=  ${echo ${CRUNCHOBJS}/*.lo.meta 2>/dev/null || true:L:sh}
share/mk/bsd.crunchgen.mk:META_XTRAS+=  ${PROG}.meta
share/mk/bsd.progs.mk:META_XTRAS+=      ${cat ${PROGS:S/$/*.meta_files/} 2>/dev/null || true:L:sh}

The bsd.progs.mk one seems especially problematic here. When a prog builds I have it record its .MAKE.META.CREATED in a prog.meta_files that the parent make reads in via META_XTRAS. I must have had a reason to not just do a find . -name '*.meta' here which this new code seems to force.

183 ↗(On Diff #43442)

Is this prune trying to reimplement -maxdepth?

share/mk/local.meta.sys.mk
114–123 ↗(On Diff #43442)

What's up with this change? I'd think the export from MAKELEVEL==0 should be sufficient.

sjg marked an inline comment as done.Jun 20 2018, 10:25 PM
sjg added inline comments.
share/mk/dirdeps.mk
751 ↗(On Diff #43442)

This is a hook to do processing that needs to happen after all other makefiles have been read - such as the barrier processing for ldorder.mk

I can add the local.dirdeps-missing.mk

share/mk/gendirdeps.mk
177 ↗(On Diff #43442)

To avoid 'arg list too long' errors - eg in libc
We can put the list of meta files into env.
Or one can set a knob OPTIMIZE_OBJECT_META_FILES=yes
in which case we only look at say .So rather than all the variants.

183 ↗(On Diff #43442)

it prevents decent into subdirs

AFAIK -maxdepth is no-standard

share/mk/local.meta.sys.mk
114–123 ↗(On Diff #43442)

It is occasionally handy to skip level 0 to see what level 1 thinks of some variable.
In such cases any processing that only happens at level 0 is bypassed.

This revision is now accepted and ready to land.Aug 2 2018, 4:25 PM
This revision was automatically updated to reflect the committed changes.