2 using common.mk in recusive make

Following from the above, each Makefile in subfolders will start by defining its own specific variables, and then it will include a common.mk which resides in common location such as $HOME.

Each makefile will include this file. An example of a Makefile in the A directory shown above is

DIRS:= B C 
include common.mk 
all::
 

Each sub directory will include similar makefile which starts by listing the directories below it, then including common.mk

The actions actually performed by makefile will be done at the bottom most directories first, followed by the higher level up. This means the tree is first traveresed to the bottom, then when the bottom is reached, on going back up, each makefile will execute any other action in its all such as compiling files and other such tasks. So, this is like a stack. The last directory visited on the way down, is the first directory that will be updated in the build process, and the top directory, will be the last directory that is updated.