Make command __linux under Linux

Source: Internet
Author: User

The key to the make command is to find out how long the previous files were modified, and to use this modification time to compare the last modification time of the dependent file. If the target file modification time is earlier than the dependent file modification time, then the dependent file must be processed (compiled) in order to update the target file, if the target file modification time is later than the dependent file modification time, the dependent file is not processed (compiled). It allows you to compile only the files that have changed since the last compilation, thereby reducing some unnecessary compilation work and increasing efficiency. Information required to execute the Make command: (1) User-defined profiles, typically makefile (2) file system-related data and time-related information (3) a set of suffix rules 2.makefile files The most important and basic function of make tools is to describe the interrelationships between source programs through makefile files and to automate the maintenance of compilation work. The makefile file needs to be written in a syntax that explains how to compile each source file and connect to build the executable file, and requires that you define dependencies between the source files. Makefile files as a description document generally need to include the following: (1) macro definition
(2) Interdependence between source files
(3) An executable command sequence on a dependency relationship the general format of the 3.make command make command: Make option ' make profile ' macro definition ' purpose file ' to first parse and assign all macro definition parameters (parameters with embedded equal equals). The macro command line overrides the definition that was made in makefile, and then examines the option flags and finally recursively checks for each destination dependent file. The options commonly used under Unix are as follows: F file specifies that the file file is a description, and if the file argument is "-", then the description file points to the standard input. If there is no "-f" argument, the system will default to the current directory named makefile or file named makefile as the description file.   In Linux, the GNU make tool searches for makefile files in the current working directory in the order of Gnumakefile, Makefile, and makefile. -I ignores error messages returned by command execution.
-s silent mode, do not output the corresponding command-line information before execution.
-R prohibits the use of build-in rules.
-N is not in execution mode, outputting all execution commands, but not executing.
-t updates the destination file.
The-Q-Make operation returns status information for "0" or not "0" based on whether the target file has been updated.
-p outputs all macro definitions and target file descriptions.
-D debug mode, which outputs detailed information about the file and the detection time. The common options for Linux are slightly different from UNIX systems, with the following different sections:-C dir changes to the specified directory dir before reading the makefile.
-I uses this option to specify the search directory when it contains other makefile files.
-H Help Text to display all make options.
-W Displays the working directory before and after the makefile is processed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.