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, Oct 27, 2:00 AM
Unknown Object (File)
Oct 2 2024, 12:30 PM
Unknown Object (File)
Sep 30 2024, 9:09 AM
Unknown Object (File)
Sep 28 2024, 7:33 PM
Unknown Object (File)
Sep 28 2024, 5:19 PM
Unknown Object (File)
Sep 27 2024, 5:39 AM
Unknown Object (File)
Sep 25 2024, 8:14 PM
Unknown Object (File)
Sep 24 2024, 1:25 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 49633
Build 46523: 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