Open
Conversation
The rule to generate Tangled/Syntax.preform was invalid.
When tangling inter directly, the inform7_clib.{c,h} files end up in the
inter directory rather than under the inform7 directory. Copy them to
the expected place after tangling.
While we're at it, make the inter subset tangling its own target,
to ensure that it's only run once during parallel builds.
When the environment variable MAKEFLAGS contains -j or similar parallel
building flag, a clean build (scripts/first.sh from a fresh checkout)
will lead to errors such as
(Step 3 of 4: building the tools)
make -f inblorb/inblorb.mk force
inbuild/Tangled/inbuild -rebuild -contents-of
inform7/Internal/Extensions/Graham\ Nelson/Standard\
Rules.i7xd/Materials/Inter
make: inbuild/Tangled/inbuild: No such file or directory
make: *** No rule to make target 'inform7/Tangled/Syntax.preform',
needed by 'inform7/Internal/Extensions/Graham Nelson/English
Language.i7xd/Materials/Languages/English/Syntax.preform'. Stop.
make: *** Waiting for unfinished jobs....
make: *** [makefile:331: forcekits] Error 127
and others. This is due to the 'force' build trying to build forcetools,
forcekits and localintegration in parallel, even though there is
actually a strict dependency between them that is not fully described by
the makefile rules.
This patch introduces two changes to avoid this issue.
First of all, we introduce the .WAIT dependency before localintegration
in the 'all' and 'force' targets. This implicitly-defined phony
dependency is used by GNU Make to indicate that the dependencies on the
right must wait for the dependencies on the left to finish.
Secondly, the kits and forcekits targets now depend on the tools used to
build the kits (i.e. Inbuild and inter). For the forcekits target, this
requires the introduction of force_* variants for the tools, that were
previously built using a single target.
As a bonus, this allows the tools themselves to now be built in parallel
even during a force build.
Similar changes can be implemented for other targets that currently
build multiple files serially, but this will be left to later commits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 patchset contains some minor and less minor bug fixes in the makefiles. The biggest one in particular solves some issues that arise with parallel builds (triggered e.g. when running
scripts/first.shon a clean, fresh checkout when theMAKEFLAGSenvironment variable includes the-jflag).There are several other parallel build improvements possible, but they are not included here and before diving into it I would prefer to know if there is an interest for such improvements or not.