第45-54 Line:
# Deal with colliding definitions from tcsh etc.
Vendor=
47
48 #########################################################################
# Allow for Silent builds
Ifeq (, $ (findstring s,$ (makeflags)))//Determine if the FindString function is empty
Wuyi Xecho = echo//If there is an echo
"Else"
Xecho =://NULL if not, that is, do not print
endif
55
This section is mainly about the content of silent compilation
Uboot allows for silent compilation, which turns on silent compilation primarily by judging Ifeq (, $ (findstring s,$ (makeflags))).
Usage: At compile time, use make-s-will be passed as makeflags to makefile.
About Makefile Knowledge points:
Conditional judgment: Main Makefile50 Line: Ifeq (, $ (findstring s,$ (makeflags)))
"Learn Makefile with Me" on page 42nd:
The syntax for a conditional expression is:
<conditional-directive>
<text-if-true>
endif
And
<conditional-directiv>
<text-if-ture>
Else
<text-if-false>
endif
where <conditional-directiv> represents a conditional keyword, such as "ifeq".
The First keyword ifeq:
Ifeq (<ARG1>, <arg2>)
Ifeq ' arg1 ' arg2 '
Ifeq "Arg1" ' arg2 '
Ifeq ' arg1 ' "arg2"
Ifeq "Arg1" "Arg2"
Compare the values of the parameter "Arg1" and "arg2". The same is true.
The Second keyword IFNEQ:
Ifneq (<ARG1>, <arg2>)
Ifneq ' arg1 ' arg2 '
Ifneq "Arg1" ' arg2 '
Ifneq ' arg1 ' "arg2"
Ifneq "Arg1" "Arg2"
Compare the values of the parameter "Arg1" and "arg2". The difference is true.
The Third keyword ifdef:
Ifdef <variable-name>
If the value of the variable is not NULL, then the expression is true, otherwise false.
findstring function
Function call Syntax:
$ (<funciton> <arguments>)
Or
${<function> <arguments>}
$ (findstring <find>, <in>)
Function: Find <find> string in string <in>.
Returns: Returns <FIND> if found, otherwise returns an empty string.
So here Ifeq (, $ (findstring s,$ (makeflags)))
This means that if the return value of the FindString function is empty. If it is empty, then the two parameters of the ifeq function are equal and the condition is judged true. Execution <text-if-true>.
Uboot Learning Two----The three----the master makefile to learn silently compile