Python Makefile · Andriy Utkin

submited by
Style Pass
2024-11-28 00:00:07

Thanks to the article “Your Makefiles are wrong” it really dawned on me that Makefile can run any interpreter, not just sh or bash:

The key message here, of course, is to choose a specific shell. If you’d rather use ZSH, or Python or Node for that matter, set it to that.

Now, there are lots of articles and discussions purporting to discuss a “Python Makefile” (for example, 1, 2). But what they actually discuss is how to invoke Python interpreter in Makefile. But that’s not what Jacob (the first article’s author) meant. You can really put Python code into Makefile:

Leave a Comment