Assume this tree structure
A---+--B | +--C
Recusrive make can be used to build everything in the tree. The directory $HOME contains
this common.mk file
all:: @for d in $(DIRS); \ do \ $(MAKE) --directory=$$d; \ done
Each of the subdirectories will contain a Makefile that includes the common.mk. Then
running the command make -I$HOME from A gives
>make make[1]: Entering directory `/tmp/B' make[1]: Leaving directory `/tmp/B' make[1]: Entering directory `/tmp/C' make[1]: Leaving directory `/tmp/C'