Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please tell the mechanism of some Linux commands !!!

Status
Not open for further replies.

MahVincent

Technical User
Oct 21, 2001
27
VN
Hi there,

When I compile or install some Linux programes, I follow the manual guide and use the commands like that:
[root localhost /root]# make install
[root localhost /root]# make config
[root localhost /root]# make clean
..................................
But as the matter of fact, I just do what they say, and don't know anything about the mechanism of these commands. For instance, I wonder "make" is program of Linux OS, and "install/config/clean" are programs going along with software package which we will install ? Or words " install/config/clean..." are arguments of command make ? Or they are configuration files. As well as how can the make command read information from software to install correctly ? ( I mean how to Linux know what it must do with the new software, what dirctories will be created, what programs will be copied and how to know the dependency between among modules ...) Tell me about this mechanism and give your comments on this issue.

Thanks a lot.

Mah vincent %^)

 
Hi,

Make is a utility for controlling the compile / link /install process of building something from source. When you enter the command 'make' the utility looks for a file called Makefile in the same directory that contains the logic for the building whatever it is. The Makefile could have been written by the developer and provided with the source code or, more often, customised from a model by first invoking './configure' .

Quite often 'make' or 'make all' will mean compile everything; 'make clean' means remove files from a prior compile before re-compiliing; 'make install' means what it says - at least the install part ! If you're really interested see -->
It all depends really on the software authors. For example when you compile a custom kernel the first stage is that you do one of 'make config', 'make menuconfig', 'make xconfig' (whichever you prefer). The net result of that stage is that there will be a file called .config which contains all info on the customised kernel. The next stage in a kernel compile is 'make dep' which works out the dependencies .... and so on.

So really, to find out exactly whats going on, you need to look in the Makefile and any other files referenced by that Makefile.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top