Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make vs $(MAKE) for submakes in makefile - what are the differences?

What are the effects of using make vs $(MAKE) inside a makefile i.e. submakes?

Are there some makeflags that are/are not propagated?

like image 780
Bob Avatar asked Oct 18 '25 12:10

Bob


1 Answers

One thing is that if make sees that the recipe contains the MAKE variable reference, it knows that the recipe is a submake and it will configure the command properly as a submake. This matters for parallel builds, terminal management, etc.

There are definitely some flags that are not propagated to submakes, but most are. You've already pointed to the documentation that describes this.

like image 92
MadScientist Avatar answered Oct 21 '25 03:10

MadScientist