Rockbox

Tasklist

FS#8482 - Build languages before main binary

Attached to Project: Rockbox
Opened by Jonas Häggqvist (rasher) - Sunday, 20 January 2008, 01:57 GMT
Last edited by Daniel Stenberg (bagder) - Monday, 18 February 2008, 12:32 GMT
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch makes the build system build languages before it starts building the main binary. It also generates a file "max_language_size.h" in the build dir, containing the size of the largest language for the selected target.

Unfortunately, my build-fu is not quite strong enough to use this inside of language.h, which is the motivation for this change since it'd bring a few nice benefits:

1. We'd no longer have to keep increasing the language buffer manually each time a language grows too large.

2. The language buffer will be no larger than it needs to be. This is especially important on Archos, where this could potentially save around 10kb on the player, and less (but still significant) on the other targets.
This task depends upon

Closed by  Daniel Stenberg (bagder)
Monday, 18 February 2008, 12:32 GMT
Reason for closing:  Accepted
Additional comments about closing:  This work is now in SVN!
Comment by Daniel Stenberg (bagder) - Sunday, 20 January 2008, 23:01 GMT
A good idea, and I've poked on it further somewhat and this is my current state - not yet ready for inclusion or anything but I thought I'd still show the somewhat modified concept that I have in mind.

The biggest annoyance right now is our automatic generation of dependency-files as they go nuts when we #include non-existing files and the generated ones of course are non-existing before they're made...

(For some reason I tend to get make errors on sysfont.h with this patch applied)
Comment by Jonas Häggqvist (rasher) - Monday, 21 January 2008, 09:57 GMT
Haven't tried it, but that's obviuosly a much cleaner solution, and should even bring down rebuild times.
Comment by Jonas Häggqvist (rasher) - Wednesday, 30 January 2008, 22:38 GMT
Something to consider: it would be nice to have an ignore file or something like that, preferably with global and charcell ignores (so the really outdated translations can be excluded, and non-ascii/greek/cyrillic translations can be excluded from the player).
Comment by Jonas Häggqvist (rasher) - Sunday, 17 February 2008, 22:06 GMT
Synced against current SVN - seems to work for me.
Comment by Jonas Häggqvist (rasher) - Sunday, 17 February 2008, 22:10 GMT
And here's a version with the apps/lang/Makefile included...
Comment by Jonas Häggqvist (rasher) - Sunday, 17 February 2008, 22:22 GMT
This version uses a file apps/lang/SOURCES to decide which languages to include. It's currently split by HAVE_LCD_BITMAP, which is the only reasonable distinction that I can see.
Comment by Daniel Stenberg (bagder) - Sunday, 17 February 2008, 22:52 GMT
Just to be a bit overly paranoid, here's my v6 that has make.inc modified and that seems to build fine for me.
Comment by Jonas Häggqvist (rasher) - Sunday, 17 February 2008, 23:02 GMT
This modifies genlang to print out slightly nicer errors/warnings and silence the warning for no quotes around 'none' in the voice part. Also fixes two small errors in language files.

Still an error before the genlang lines: cc1: error: config.h: No such file or directory
Comment by Daniel Stenberg (bagder) - Sunday, 17 February 2008, 23:30 GMT
Ok, I committed a version but it was not good since it broke the bootloaders and lacked using the actual max_language_size.h file

This v8 version fixes the latter part, does not include the genlang fix from Jonas' v7 (it is better committed separately) but has not got the bootloader builds fixed. I'll get to it later unless someone else does it!
Comment by Daniel Stenberg (bagder) - Sunday, 17 February 2008, 23:34 GMT
Uhm, it wasn't clear in my previous message but I reverted my committed pretty quickly due to these problems.
Comment by Jonas Häggqvist (rasher) - Sunday, 17 February 2008, 23:36 GMT
I've committed the genlang change as r16340.

Loading...