Skip to content
  • George Oikonomou's avatar
    Improve MODULE dependency handling · 28702121
    George Oikonomou authored
    Currently, to satisfy MODULE dependencies, we use a two-pass approach whereby MODULE makefiles are incuded and then included again. This allows us to specify MODULE dependencies, but has a number of problems:
    
    * If a module Makefile is included in the first pass and tries to specify rules, make will throw a warning (#472)
    
    * If a module Makefile is included in the first pass and tries to append to a recursively expanded variable, the variable will ultimately end up with an unintended value (#831). For example, if we do `CFLAGS += -DBUILD_WITH_ORCHESTRA=1`  then `-DBUILD_WITH_ORCHESTRA=1` will appear twice in the compilation commad line. This is not a huge deal, but it's annoying and confusing.
    
    This commit fixes the module dependency handlig logic by making sure that Makefiles included in the first pass don't get included again in the second pass. Basically the second pass is only for dependent module Makefiles.
    28702121