Here’s the portable Makefile that handles my workflow. The best part is that you can do pretty much anything in a terminal, and certainly handle all the workflow steps listed above. The writing of rules mostly comes down to shell commands, which is the main reason Makefiles are as portable as they are. I enjoy the ease of using variables and macros, and the modularity of rules when it comes to organizing my steps. While much of my particular use case could be achieved with shell scripting, I find Make offers some worthwhile advantages. With derivatives such as Nmake, it’s better to write a separate Makefile with appropriate Windows commands. Compatibility with non-Unix-like systems is a little more complicated, since shell commands differ. (For a more thorough summation of POSIX-compatible Makefiles, I found this article helpful: A Tutorial on Portable Makefiles.) I run Ubuntu, so I’ve tested the portability aspect using the BSD Make programs bmake, pmake, and fmake. To write a truly portable Makefile, mine follows the POSIX standard. Make derivatives, such as GNU Make and several flavours of BSD Make also run on Unix-like systems, though their particular use requires installing the respective program. POSIX-standard-flavour Make runs on every Unix-like system out there. Next week I’ll cover my Actions set up today, I’ll take you through the nitty-gritty of my Makefile so you can write your own. Thanks to the introduction of GitHub Actions, I’m able to do all the above with just one portable Makefile.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |