Why Learn Makefiles
Makefiles are the entry point to software projects
Published: Friday, Oct 7, 2022 Last modified: Monday, Dec 9, 2024
Why make?
Make is a software tool older than myself that new developers might over look, as being old and irrelevant.
The Makefile language requires tabs and that alone causes new users to abandon it.
There are some good reasons to know basic Make:
- It’s the entrypoint for thousands of software projects
- It’s fast
make
is present with any devel environment- The
Makefile
describes the rules on how the software is built!
Tips to improving your Make experience
Use an $EDITOR that shows tabs:
set list listchars=nbsp:¬,tab:»·,trail:·,extends:>
Keep it simple! Targets should be files, if not PHONY to be pedantic
Ensure bash completion works:
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
Try https://github.com/tj/mmake
My own examples
- https://github.com/search?q=user%3Akaihendry+filename%3AMakefile&ref=simplesearch
- https://dabase.com/blog/2013/Makefile_based_static_site_generator/
Further argumentation on the need to automate your processes, using a similiar
./go
concept, but pretend it says make
instead, see:
https://www.thoughtworks.com/en-sg/insights/blog/praise-go-script-part-i