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.
Overview
This contains some key edits. Namely:
constgen
generation tometang
generation.data
androm
. Thedata
stage is effectively a phony-target that encapsulates all packaged filesystem archives and generated code. Therom
stage builds the game's code and packages it into the final ROM image. This pipeline split is due to what appears to be a bug in Ninja's detection for generated-headers when they are build as one of multiple outputs of their generating build target.postconf
script modifies the dependency-class of generated constants used by all script files to beorder-only
. This means that Ninja only cares that the constants are generated at all before proceeding to process any script files; the depfiles generated bygcc
tell Ninja which headers these files actually care about.pl_msg.narc
no longer generates an index-header. Instead, we now make use of a static ordering that a user will have to edit whenever they want to edit a new file, so that underlying accessors to the NARC know that they must be re-compiled. This, functionally, is similar to needing to edit thefiles
listing for the pre-refactor build procedure, but it means that changing text archives by themselves will not necessitate rebuilding many targets which do not reference the edited banks.Test Cases
To verify my changes, I
touch
ed a single data file of each of the major core component types and verified the dependency chain determined by Ninja. All of the below logs begin from a state wheremake
yields ano-op
build.Pokemon Data Files
The recompiled files for overlays 5 and 113 are related to move tutors and footprint data, respectively.
Message Banks
Source code files which make use of the encoded text-bank must always be recompiled.
Generated Constants
This realm still has opportunity for improvement (and will continue to improve as I continue to make changes to the build-scripts). For brevity, the full log is truncated.
Scripts
This was the original bogeyman, and it is finally dead. There is further improvement to be made here for battle subscripts especially, since we have duplicate ordering in
generated/battle_subscripts.txt
andres/battle/subscripts/sub_seq.order
.Adding a New Text Bank
I made the following change to
generated/text_banks.txt
:Then attempted to build, which -- as expected -- triggered a regeneration of the build files and failed (because
res/text/unk_0724.gmm
does not exist):Renaming an Existing Text Bank