Modern Make Handbook
for modern developers
Sharpen your axe before chopping wood
– What cats say when they’re hungry?
– Meow!
– What dogs say when they smell danger?
– Woof-woof!
– And what does Bob say when he’s deploying project?
– ansible-playbook -i inventory/production --tags "deploy" app-server.yml -vvv --become-user=app --extra-vars=extra.txt --vault-password-file="~/.ansible/vault.txt"
Such things slowly eat up our time
12 mins of routine tasks a day == 4 hrs per month == ~1.5 work week per year
With Make you can establish a library of shortcuts for frequently used commands. Names of such shortcuts represent their semantics, not implementation:make deploy
, make logs
, make feature resubscription
Makefile is stored in the project repository and becomes a live development workflow documentation shared between the whole team.
– Hey, come on! I thought Make is some ancient tool from the past, no one needs anymore!
– Oh, I remember I used it to compile some libraries from sources two years ago? It can be used for something else?
– Hold on, I am not a C/C++ developer to compile stuff. I already use npm/rake/maven. Why should I care about one more tool?
This is how I used to think too. The reality is that:
Make plays the role of the universal glue between many technologies we have to use in the modern (web-)development.
It is not a replacement for your native tools for building and compiling stuff.
It is a way to take out all the shell scripts from your yarn/rake/maven because they look unnatural there and cause a lot of overhead.
Less than 25% of developers use Makefile as a library of shortcuts:
If you're one of the rest 75%, you're about to learn the approach, which can save you a huge amount of time in the future.
I'd put Make in the same row as Ansible, Docker and GitLab CI.
It is a trusty, universal, hipster (in a good way) tool to organize chaos in your development workflow.
Make is great, but its official documentation is too detailed and only readable if you're sysadmin thinking in a mix of C and shell scripts. It contains way too many details - way too far from the needs of a modern developer.
Because of that, I created the mini-reference describing only features useful for modern developers.
Official documentation:
7500 lines
→
Extraction of useful stuff:
500 lines
But you don't need to read them either :)
How so?
What should I do then?
1. To understand the main idea of modern Make usage, watch this 5 minutes video.
2. If you want to try it, download the Make mini-reference for modern developers.
3. If you want to organize the whole development workflow using Make, then the extended version of the reference with examples and advanced tricks is what you need.
Modern Make Handbook
1. Making your library of shortcuts
2. Overcoming Make weirdness
3. Multiple commands at once
4. Subcommands
5. Aliases
6. Multiline commands
7. Suppressing output
8. Conditional execution
9. Passing arguments
10. Advanced scripting
11. Putting things in order
12. Naming conventions
13. Full workflow automation
14. Guiding principles
Looks too simple?!
We have a link for too smart ;)
Subscribe to get the handbook
Leave me your email and I'll send you the handbook. I'll also let you know when the extended version is ready
Intro to Make
Sounds reasonable!
Now what?
Should I really download that PDF then?
Modern Make Handbook
1. Making your library of shortcuts
2. Overcoming Make weirdness
3. Multiple commands at once
4. Subcommands
5. Aliases
6. Multiline commands
7. Suppressing output
8. Conditional execution
9. Passing arguments
10. Advanced scripting
11. Putting things in order
12. Naming conventions
13. Full workflow automation
14. Guiding principles
← In progress
Already use Make like a pro?
Help others!
Send the link to your friend, or spread the word about Make in social networks: http://makefile.site
P.S. Your pull requests are more than welcome:
github.com/inem/make-handbook
🙌High five!
FYI, you can also read PDFs you download :)
Two pages would be enough for today!