What is make in Linux systems ? why do we need it ?

What is make in Linux systems ? why do  we need it ? 




Make : make is a  utility which determines automatically that which part of  program need to be recompiled and issue the needed command to recompile them. Make can be used with any programing language where the command of compilation can be run with any shell commands. you can also use make to update the program if some dependent program may changed or get updated . 

To use make utility you must have to define a file which is known as make file and whole relation between the programs and also the detailed commands needed for update purpose should be written on.in most of instances the executable file is get updated from object file which was made by compiling the source code files. 


so when ever you change the source file the necessary command is issued by the make file to recompile all need files and update it as per requirement. the description and the modification time of the files are used to update the relationship of the files. make file can have one or more target to update after each execute command. Typically -f command option is available if no than the make looks for GNUmake, makefile,Makefile in this order. 

GNU make file is only used if make file specific to GNU make. if make file is '-' ithe standard input is read.

Option in Make


-b, -m            These options are ignored for compatibility with other versions of make.

-B,                --always-make Unconditionally make all targets. 

-C dir,           --directory=dir Change to directory dir before reading the makefiles or doing anything else

-d                  Print debugging information in addition to normal processing.

-e,                 --environment-overrides Give variables taken from the environment precedence over  

                     variables from makefiles.
-E string,     --eval string Interpret string using the eval function, before parsing any makefiles.

-f file,          --file=file, --makefile=FILE Use file as a makefile.

-i,                --ignore-errors Ignore all errors in commands executed to remake files.

-I dir,           --include-dir=dir Specifies a directory dir to search for included makefiles

-k,               --keep-going Continue as much as possible after an error

-L                --check-symlink-times Use the latest mtime between symlinks and target.

-O[type],    --output-sync[=type] When running multiple jobs in parallel with -j, ensure the output of 

                   each job is collected together rather than interspersed with output from other jobs.
-s,               --silent, --quiet Silent operation; do not print the commands as they are executed.


option are not exhaustive you may refer Linux manual page for more option and details.