Indenting pre-receipe sections with spaces seems to work fine based on an initial test. Once we get to any conditionals inside a target, you'll need to change things up.
So that we don't have issues with whitespace, we can update the .RECIPEPREFIX value to change away from indenting with tabs for the targets. See this discussion: https://stackoverflow.com/questions/54820007/why-doesnt-make-allow-indented-...
``` organize the makefile to have conditionals first, then rules, i.e. no TAB indentation after rules anymore except for recipes, or always make sure to use SPACEs for conditional, variable assignment and rule lines. set .RECIPEPREFIX to a non-whitespace character, e.g. > and use that to indicate recipe lines. ``` If we do go this route for indentation, could we standardize on either 2-space 4-space indentation per level? The Makefile lines are long enough without indentation.
Martin
Nov 22, 2023, 16:50 by maximilian.brune@9elements.com:
Hi
Reading Makefiles especially in big projects like coreboot is a constant. pain. One of the big issues is that conditionals are very hard to read since we cannot use tabs for indentation. Has anyone ever thought about using whitespaces as indentation for conditionals in our Makefiles or is that connected to known problems?
greetings Max