Brian Ruthven - 2015-01-15

I think what is needed is the separation of the variables (such as BASEDIR and any additional CFLAGS) from the "execution" makefiles which contain targets.

For example, if there is a top-level Makefile which only knows how to build targets, descending into directories as required, each subsequent level contains similar Makefiles which only know how to build targets. Then, each leaf Makefile can include the relevant previous Makefile.kernel or Makefile.master as required.

This would avoid the repeated inclusion of the same top-level Makefile.common or Makefile.kernel along the way, and should avoid the repeated options as each Makefile accumulates more...