Closed stsquad closed 1 year ago
@stsquad
compile-multi is really just a framework for defining compilation commands that you can select interactively. It should be flexible enough that you can plug any target generation backend into it, although if the question is dynamically updating the targets shown by compile-multi within a compile-multi session then that is currently out of scope.
Projection is a projectile like project management package and I opted to place target generation functions for different backends into it (because it already has customization options for build-framework oriented commands (like CMake) and it has a convenient caching system based on the current project). If you take a look at the Makefile target generator it basically just opens the file and greps for patterns matching a target definition. If you want you should be able to specify a collection of Makefiles and read from all of them instead.
I don't really understand the workflow you're looking for here, could you elaborate somewhat (a sample project would also be great to drive the meaning). The counsel code you reference seems to be doing a few different things all through the same function.
TL;DR; compile-multi can support any function that can return a collection of targets. You can implement a backend function that can source from multiple Makefile targets (I'm also happy for you to contribute this to projection). Projection is basically a dumping ground for target generators for common project types (normally just the ones I use but others are welcome).
I'm going to go ahead and close this but feel free to continue a discussion here. If there's any features or functionality you think compile-multi should add then we can discuss it before creating a dedicated issue for it.
Hi,
I saw this pop up on the MELPA feed today so I'm intrigued if this is a route to enabling similar consult powered compile features that I currently achieve with counsel's compile (https://github.com/abo-abo/swiper/blob/master/counsel.el#L6371). I was involved in writing that and one feature that was important was dealing with build directories. This meant counsel-compile goes through multiple selection stages allowing you to either select a previous build command from history, or select a build dir at which point it could then extract targets from the Makefile.
Is this something you could approach with compile-multi directly or should I look at doing this within the projection-multi-compile extensions?