Do not fully defragment the shell statements in makefile (mainly for utility only)

Source: Internet
Author: User
1. Some common functions

Wildcard wildcard is a pattern matching function, the function model is roughly $ (wildcard parameter), the function's return value is the file that is actually found after the match, or other, depending on the argument, for example, using a statement in the shell C_source = $ ( Wildcard%.c), then the value of C_source is the collection of all. c files in the same folder as the current makefile file.

Patsubst Patsubst is a function of pattern substitution, and unlike wildcard, this function can replace some characters in a dictation string in some format, whose function model is $ (patsubst arg1, arg2, TEXT) For example, In the shell we often use c_objs= (Patsubst (Patsubst%.c,%.o, (C_source)), then the return of the function to the C_OBJS value is, will C_ All the files in source that end in the. c format are replaced with the. o Format

. Phony this is a special keyword, the characterization is followed by the target file, in the console when using certain commands, do not check for the existence of files to be processed, commonly used in the life of clean this action in the shell statement such as the use of a sentence, such as. Phony:clean, when you perform a clean command on the console, you do not check to see if the target file to clean is present.

——————-not yet ready to add

Related Article

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.