You can set variables which are used only by some rules
X:=foo foo: @echo $(X) # foo bar: @echo $(X) # bar bar: X:= bar