Page MenuHomeFreeBSD

Update dirdeps.mk et al to latest
ClosedPublic

Authored by sjg on Jun 8 2018, 1:46 AM.
Tags
None
Referenced Files
F106639072: D15701.id46217.diff
Fri, Jan 3, 4:35 AM
Unknown Object (File)
Sun, Dec 29, 9:13 PM
Unknown Object (File)
Thu, Dec 5, 1:14 PM
Unknown Object (File)
Wed, Dec 4, 10:39 PM
Unknown Object (File)
Dec 1 2024, 2:30 PM
Unknown Object (File)
Dec 1 2024, 1:27 AM
Unknown Object (File)
Nov 29 2024, 5:28 PM
Unknown Object (File)
Nov 25 2024, 12:39 AM

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 Skipped
Unit
No Test Coverage
Build Status
Buildable 17502
Build 17329: arc lint + arc unit

Event Timeline

share/mk/dirdeps.mk
752

s/is/this/

753

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

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

Is this prune trying to reimplement -maxdepth?

share/mk/local.meta.sys.mk
114–123

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
753

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

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

it prevents decent into subdirs

AFAIK -maxdepth is no-standard

share/mk/local.meta.sys.mk
114–123

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.