Page MenuHomeFreeBSD

depend-cleanup.sh: Simplify the logic, and clean bootstrap tools.
ClosedPublic

Authored by des on Feb 8 2023, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 9, 6:36 AM
Unknown Object (File)
Fri, Feb 7, 9:16 PM
Unknown Object (File)
Sun, Jan 26, 6:02 AM
Unknown Object (File)
Sat, Jan 25, 11:41 AM
Unknown Object (File)
Sat, Jan 25, 8:11 AM
Unknown Object (File)
Sat, Jan 18, 8:09 AM
Unknown Object (File)
Fri, Jan 17, 8:04 PM
Unknown Object (File)
Jan 10 2025, 5:09 AM
Subscribers

Details

Summary
  • There's no need to check if the file exists before grepping it; if it does not exist, grep will fail, which is what we want. Just redirect the error message to /dev/null.
  • There's no need to split the .o and .pico cases; the bodies are identical, so combine the conditions. Use a glob to avoid a false negative if one exists but not the other.
  • Also run depend-cleanup.sh on the bootstrap build tree. This unbreaks the build after 29c5f8bf9a01.

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Feb 8 2023, 8:47 PM
des created this revision.

I'm not 100% sure hardcoding tmp/obj-tools here is the best approach; perhaps we should simply run depend-cleanup.sh with OBJTOP=${WORLDTMP} before building bootstrap tools?

This revision is now accepted and ready to land.Feb 8 2023, 8:49 PM

Remove unnecessary line continuations.

This revision now requires review to proceed.Feb 8 2023, 8:57 PM

perhaps we should simply run depend-cleanup.sh with OBJTOP=${WORLDTMP} before building bootstrap tools?

Yeah, I think we should do that (or at least have the knowledge of what WORLDTMP is limited to Makefile.inc* rather than here).

FWIW the duplicated case was introduced in 838a061417300

Instead of hardcoding knowledge of tmp/obj-tools into depend-cleanup.sh, run it twice.

This revision is now accepted and ready to land.Feb 8 2023, 10:53 PM