A makefile is a special file, containing shell commands, While in the directory containing this makefile, you will type make and the commands in the makefile will be executed

Get Started:

touch Makefile

Open Makefile and paste the following lines into it which three tasks

help , install and prepare

by default, make considers first task as default task to change this behavior add this line

.DEFAULT_GOAL := prepare

Now type make

Execute a set of tasks in one command

Assume you have a project and you have first to clean unwanted files then you have to download a file then execute the command it will be a lot of hassle to tell a user to do a set of tasks instead of that we can do it via a single and short command using Makefile.

so we have to define make file contains set of tasks clean, download, execute and install which will be the task that executes [clean, download, execute]

and this can happen using this syntax