Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do you mean by 'make' command in linux?

First, i know that make is used for building the code. But which code?

But what does it mean by building a code, and after executing the make command, what is presented to the user?

Second, how is it different from make build_for_e2e?

like image 921
RV186 Avatar asked Aug 23 '16 12:08

RV186


People also ask

What is make command in Linux?

make is typically used to build executable programs and libraries from source code. Generally speaking, make is applicable to any process that involves executing arbitrary commands to transform a source file to a target result.

What command is make?

The make command uses information from a description file, which you create, to build a file containing the completed program, which is then called a target file. The internal rules for the make command are located in a file that looks like a description file.

Why make is used in Linux?

make The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them. you can use make with any programming language whose compiler can be run with a shell command.

What is make file in Linux?

Makefile is a program building tool which runs on Unix, Linux, and their flavors. It aids in simplifying building program executables that may need various modules. To determine how the modules need to be compiled or recompiled together, make takes the help of user-defined makefiles.


1 Answers

What Wikipedia tells about make

Make is a build automation tool that automatically builds executable programs and libraries from source code

Compilation process becomes big and complex in big projects, where numbers of files need to be compiled, with flags and libraries. Where it will become hard for people to compile it one by one. So these types of tools were introduced, there are more similar tools available for same use like cmake, gradle, maven. e2e's Build is also a form of build process, with different form of specifications.

For C people mostly use make. It is helpful for porting software packages in different systems.

How make is used:

As said make is a tool, which will be available in our system, we can execute it by giving command make in the directory which needs to be compiled. Then make looks for Makefile, which is provided in the package directory and it contains information about compilation of the project. Then make as per info gathered from Makefile, it compiles the package.

You can also create Makefile for your project, so that it can be also supported and compiled with make. Simple tutorial for it can be found here. For big projects you can use gnu autotools contains autoconf and automake which will help you to create your all files required by make automatically. You can find tutorial regarding it here and here . These contains some basic information, you can find some advance tutorial regarding autotools, use google for more information on it.

like image 109
Samrat Das Avatar answered Sep 27 '22 23:09

Samrat Das