Generate per-language translation sources (#806)

This generates dedicates Translation.cpp files for translation language
and derives all language-specific data from them.

The Makefile is extended to also take care of generating these source
files.
This allows reuse of nearly all object files between builds of different
languages for the same model and regenerating the translation sources if
necessary.
This speeds up the release builds and the normal write-compile-cycle
considerably.
It also eliminates miscompilations when manually building different
languages.
This commit is contained in:
Thomas Weißschuh
2021-02-02 09:44:34 +01:00
committed by GitHub
parent 5e372310cd
commit 15e51f9faa
36 changed files with 108 additions and 266 deletions

View File

@@ -123,16 +123,8 @@ if [ ${#BUILD_LANGUAGES[@]} -gt 0 ] && [ ${#BUILD_MODELS[@]} -gt 0 ]; then
checkLastCommand
for model in "${BUILD_MODELS[@]}"; do
for lang in "${BUILD_LANGUAGES[@]}"; do
echo "Building firmware for $model in $lang"
make -j lang="$lang" model="$model" >/dev/null
checkLastCommand
echo "Cleanup Temp files for $model in $lang"
rm -rf Objects/*/Core/ >/dev/null
checkLastCommand
done
echo "Cleanup model change"
rm -rf Objects/ >/dev/null
echo "Building firmware for $model in ${BUILD_LANGUAGES[@]}"
make -j$(nproc) model="$model" "${BUILD_LANGUAGES[@]/#/firmware-}" >/dev/null
checkLastCommand
done
else