makefile - Variable assignment in recursive make call -


i have simple makefile below:

var += 4 5 6  default:     @echo "$(var)" a:     var="1 2 3" make b:     make var="1 2 3" 

make a works expected , print 1 2 3 4 5 6, make b print 1 2 3. thought 2 variants identical.

the question is: why so?

to quote gnu make manual:

if variable has been set command argument, ordinary assignments in makefile ignored.

you can change overridedirective:

 override var += 4 5 6 

Comments

Popular posts from this blog

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -