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)
Mon, Nov 24, 5:21 AM
Unknown Object (File)
Sun, Nov 23, 9:28 PM
Unknown Object (File)
Sun, Nov 23, 2:50 PM
Unknown Object (File)
Sun, Nov 23, 1:45 PM
Unknown Object (File)
Sun, Nov 23, 12:11 PM
Unknown Object (File)
Sun, Nov 23, 11:58 AM
Unknown Object (File)
Fri, Nov 21, 9:34 PM
Unknown Object (File)
Thu, Nov 20, 10:22 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