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)
Thu, Dec 18, 2:48 AM
Unknown Object (File)
Thu, Dec 11, 6:00 PM
Unknown Object (File)
Thu, Dec 11, 2:35 PM
Unknown Object (File)
Thu, Dec 11, 9:28 AM
Unknown Object (File)
Sat, Dec 6, 12:26 PM
Unknown Object (File)
Fri, Nov 28, 2:15 PM
Unknown Object (File)
Mon, Nov 24, 5:21 AM
Unknown Object (File)
Sun, Nov 23, 9:28 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 49634
Build 46524: arc lint + arc unit

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