Re:Learn Makefiles with the Tastiest Examples
by paulddraper on Monday May 15, 2023 @11:58PM
(#35957604)
> Most (all?) of your Makefile targets don't represent actual files to 'make'.
> You're using make to run a bunch of tasks, including where tasks may depend on other tasks having been run before.
And the cool thing is....it works for both!
It can represent an actual file (e.g. a compiled binary) or abstract result (e.g., a successful test).
Re:Learn Makefiles with the Tastiest Examples
by therein on Tuesday May 16, 2023 @01:44AM
(#35958100)
I wish `just` had a way to capture the output of functions and act on them.
Without that, it is only a slightly more straight-forward Make that's way less likely to be installed on the system plus you have to take additional steps if you want shell completion for tasks.
You're using make to run a bunch of tasks, including where tasks may depend on other tasks having been run before.
A task-runner tool like `just` is better suited to this task. https://github.com/casey/just
`just` has some nice UX improvements over `make`. (e.g. doesn't require soft tabs, can list recipes out of the box, recipes can take command line arguments, supports .env files, can be run from any subdirectory).