Skip to main content

Posts

Showing posts from September, 2025

Makefile – A Simple Way to Automate Your Commands

Have you ever found yourself typing the same long command again and again in a project, and thought… "Life would be so much easier if I didn’t have to type this every single time" ? That’s exactly where a Makefile can help you. What is a Makefile? A Makefile is just a plain text file where you define shortcuts for your commands. It tells the make command what to do when you type something like: make up Instead of writing the whole long command every time, you just run make with the shortcut you defined. A Simple Example Let’s say you’re working with Docker and the command to start your app looks like this: docker-compose -f docker-compose.development.yml up Typing this again and again is boring. Instead, create a file named Makefile in your project root and add this: up: docker-compose -f docker-compose.development.yml up Now, all you need to do is run: make up Boom! Much shorter, much cleaner. Adding More Commands You can add as many shortcuts as you want inside yo...