Hi, I’m looking at tidying up some existing makefile logic and noticed there isn’t a lot of consistency in the format of conditionals - especially from myself over the years. We use make for build automation, not directly for compilation, and don’t use any pre-processor conditionals in this context, only the inline functions.
I’ve started replacing constructs like: $(if $(value foo)… with: $(and $(foo)… the short-circuit `and` and `or` are really helpful for most cases when `if` doesn’t have an `else` or `else` is a longer list. When there is an `else` in a complex section, it sometimes looks like: $(if <condition>, \ <do something> \ , \ <do something else>) These can be deeply nested and the dangling `, \` can get really hard to parse. Constructs like: $(if <condition>, \ <do something> \ $(else), \ <do something else>) help readability and seem to work. I know I can use any misspelling or mangling of `else`, or something like $(otherwise), but `else` is really easy to read and parse. Is this a reasonable idea and is there any chance $(else) will have some defined value in the future? Cheers, Tony _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make