oneapi-src / oneDAL

oneAPI Data Analytics Library (oneDAL)
https://software.intel.com/en-us/oneapi/onedal
Apache License 2.0
617 stars 214 forks source link

FIX(make): fix incremental builds by only releasing updated headers #2949

Closed ahuber21 closed 3 weeks ago

ahuber21 commented 1 month ago

Description

This PR introduces a check using the cmp command in the macros responsible for publishing header files from the include directory to the __release_* directories. With this enhancement, headers are only released if their contents have changed.

This improvement addresses an issue with make's caching mechanism, which relies on file timestamps. Previously, central header files like library_version_info.h were released every time make was invoked, regardless of whether their contents had changed. This caused the timestamps to always be newer than those of the source files, triggering unnecessary target updates and negating the benefits of incremental builds.

With the proposed changes, only files that have actually changed (along with their dependencies) will be rebuilt, thereby preserving the efficiency of incremental builds.

Fixes https://github.com/oneapi-src/oneDAL/issues/2944 and probably also https://github.com/oneapi-src/oneDAL/issues/632


Checklist to comply with before moving PR from draft:

PR completeness and readability

Testing

does not apply - build chain only

Performance

does not apply - build chain only

ahuber21 commented 1 month ago

/intelci: run

ahuber21 commented 1 month ago

Thanks @Alexsandruss. It was still a draft, but the latest changes seem to fix the issue and don't add any new spaces. @sterrettm2 could you check out the latest commit 3cbe3ac and let me know if incremental build still works for you?