Skip to content
Snippets Groups Projects
Commit 96d2346d authored by Simon Rose's avatar Simon Rose
Browse files

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.
parent d666ced4
No related branches found
Tags 3.4.4
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment