File name of 1.Makefile
You can use other filenames to write makefile, such as Make.linux, if you want to specify a specific makefile, you can use the "-F" and "--file" parameters of make, such as
Make-f make.linux or make--file make.linux
2. Using the Include keyword in makefile can include other makefile,
Include <filename>//filename can be the file mode of the current operating system shell (can be guaranteed with path and wildcard characters)
There can be some empty characters in front of the include, but never the tap key to start. Include and <filename> can be separated by one and more spaces
Example: For example, you have a few makefile:a.mk, B.mk, C.mk, and a file called Foo.make, and a variable $ (bar) that contains e.mk and F.MK
Include Foo.make *.mk $ (bar)
Equivalent to:
Include Foo.make a.mk b.mk c.mk e.mk f.mk
3.LPR and LP to generate print jobs
LPR [-P printer queue] [-# print copies]-u [Username] File
Specify HP_P2015 this printer to print/etc/passwd this file
[Email protected] ~]# lpr-p hp_p2015/etc/passwd
Multi-target in 4.Makefile
"[Email protected]" Automation variable, which represents a collection of multiple targets in the current rule
Bigoutput LITTLEOUTPUT:TEXT.G
Generate TEXT.G-$ (subst output,,[email protected]) > [email protected]
The "$" in-$ (subst Output,,[email protected]) represents a function that performs a makefile, the function is named subst, followed by a parameter.
"[email protected]" represents a collection of targets, just like an array, "[email protected]" takes out the target and executes the command
5.subst This is a replacement function with three parameters, the first parameter is the replacement string, the second argument is the replacement string, and the third parameter is the string that the substitution operation acts on.
Comma:=,
empty:=
Space:= $ (empty) $ (empty)
Foo:= a b C
Bar:= $ (subst $ (space), $ (comma), $ (foo))
$ (subst $ (space), $ (comma), $ (foo))//This function is to replace the space in $ (foo) with a comma,
Makefile Learning (02)