Rewrote the .template/.substitution expansion
This is necessary for the following reason: the previous mechanism used an eval/call combination that required SUBS and TMPS to be exported on a previous pass through. This allowed us to use `vpath` for each specific file in order to locate the correct source files. In order to avoid that, we add two new ingredients: * `VPATH` instead of `vpath`, since it allows us to have variables that are expanded later * `.SECONDEXPANSION`, which allows a target (`db_internal`, in this case) to perform a second variable expansion at the _end_ of the pass through. All of this is necessary because the typical module makefile looks like: ``` include driver.makefile SUBS += ... ``` i.e. `SUBS` and `TMPS` are defined _after_ the inclusion of driver.makefile. If we don't want to force a re-write of every single module makefile, we needed to do some of the above changes.
Please register or sign in to comment