Page MenuHomeFreeBSD

Avoid rebuilding libpmc in every incremental rebuild
ClosedPublic

Authored by arichardson on May 9 2020, 5:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 3:05 AM
Unknown Object (File)
Dec 20 2023, 8:06 AM
Unknown Object (File)
Dec 11 2023, 1:20 AM
Unknown Object (File)
Dec 7 2023, 12:37 PM
Unknown Object (File)
Dec 3 2023, 2:05 PM
Unknown Object (File)
Nov 10 2023, 1:06 PM
Unknown Object (File)
Oct 18 2023, 1:30 AM
Unknown Object (File)
Oct 10 2023, 8:47 PM

Details

Summary

Generate libpmc_events.c in a temporary file first and only overwrite it
if the files are actually different.
This avoids compiling and relinking the different variants of libpmc on
every incremental build.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32061
Build 29586: arc lint + arc unit

Event Timeline

arichardson created this revision.

My only real question is do you want to do a single target? Since you are using mv instead of cp make is always going to invoke both targets anyway. The single target version would just join the two bodies.

lib/libpmc/Makefile
40

Not sure if this should be ${MV} vs mv? (Probably it would in ports, not sure if we add that indirection in src)

jhb added inline comments.
lib/libpmc/Makefile
40

I think you had libpmc_events.c in CLEANFILES in your first version? We probably still want that as well since it's not a checked-in file?

This revision is now accepted and ready to land.Jun 30 2020, 4:51 PM
lib/libpmc/Makefile
40

Ah yes, accidentally dropped that. Will restore before committing.