Add "astyle-all" rule to Makefile #51897
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
"make astyle" got ~100 times slower on Windows + MSYS2 after #51731.
Each invocation of astyle on one file takes a few seconds, so astyling all the files takes several minutes, even with "-j8".
This PR brings back the old method of astyle that processes all the files at once, using a new make target.
Describe the solution
Add "astyle-all" make target, using the definition prior to #51731.
Describe alternatives you've considered
Trying to debug why "make astyle" is slow. I wouldn't even know where to begin.
Conditionally defining "make astyle" using the old logic if the OS is Windows? I don't know if this is Windows specific of MSYS2 specific.
Testing
Ran "make astyle-all". It finished in seconds, which is what I'm used to seeing.
Additional context