sub-venv rules: move core dependency to inner make exclusively #217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a problem I've overlooked initially: Having the
ocrd
(or core) dependency above theMAKELEVEL
distinction, i.e. visible both on the inner and outer invocation, is not only unnecessary (as the outer rules strictly only need a bash script), but may break when the outer venv is not fully installed already (which may even happen on an initial checkout when runningmake -j all
). Example:Explanation: the outer
$(BIN)/ocrd
rule gets checked for dependencies in a context where all immediate variables are expanded (make phase 1), with the outer value forVIRTUAL_ENV
. So if the outer venv does not exist yet, it gets created. But then that rule's recipe gets executed in a context where all deferred variables are expanded (make phase 2), with the inner value of the sub-venv. But since we are still in the outer make level, we have no rules to create the inner venv yet.This PR therefore moves all these dependencies into the inner context exclusively.