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
F97332449: D38447.diff
Sat, Sep 28, 5:19 PM
Unknown Object (File)
Fri, Sep 27, 5:39 AM
Unknown Object (File)
Wed, Sep 25, 8:14 PM
Unknown Object (File)
Tue, Sep 24, 1:25 PM
Unknown Object (File)
Tue, Sep 24, 1:25 PM
Unknown Object (File)
Tue, Sep 24, 1:25 PM
Unknown Object (File)
Tue, Sep 24, 1:25 PM
Unknown Object (File)
Tue, Sep 24, 1:24 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