Linux makefile Study Notes

Source: Internet
Author: User

The execution steps for GNU make are as follows:

1. Read all makefiles;

2. Read Other makefiles included;

3. initialize the variables in the file;

4. Deduce concealed rules and analyze all rules;

5. create dependency links for all target files;

6. Determine the targets to be regenerated Based on the dependency relationship;

7. Run the generated command.

Step 1-5 is the first stage, and step 6-7 is the second stage. In the first phase, if the defined variable is used, make will expand it to the position in use. But make will not be fully expanded immediately. Make uses the procrastination strategy. If the variable appears in the dependency rule, it will only be used when the dependency is determined, variable is expanded within it.

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.