I have seen code like the following following code in a Makefile:
a: x = 0
What does this line mean? Is it a rule, or something else?
That is called a target specific variable, see: https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html
It gives a different value to a variable inside a given target.
Sample usage:
x := 0 a: x := 1 a: @echo $x b: @echo $x
Now:
$ make a 1 $ make b 0
1.4m articles
1.4m replys
5 comments
57.0k users