diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2008-02-17 23:12:54 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2008-02-17 23:12:54 +0000 |
| commit | 4a06c87e7869bb2703c0b0181d3816ba73dff9ff (patch) | |
| tree | 5d9c1ea2e534337d548ec97568a23615a56e9d1b /apps | |
| parent | 8c81e789cc7da214db5a5c1a3aa3698375a400e3 (diff) | |
| download | rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.zip rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.tar.gz rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.tar.bz2 rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.tar.xz | |
FS#8482:
Build system tweak that builds all languages first, to make the system able
to use a buffer size that fits the larger language only. Parts of this work
done by Jonas Haggqvist, but all the mistakes are my own!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16337 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/FILES | 1 | ||||
| -rw-r--r-- | apps/lang/Makefile | 37 | ||||
| -rw-r--r-- | apps/lang/SOURCES | 35 | ||||
| -rw-r--r-- | apps/language.h | 11 |
4 files changed, 83 insertions, 1 deletions
@@ -41,6 +41,7 @@ codecs/Tremor/* eqs/*.cfg gui/*.[ch] keymaps/*.[ch] +lang/SOURCES lang/*.lang menus/*.[ch] metadata/*.[ch] diff --git a/apps/lang/Makefile b/apps/lang/Makefile new file mode 100644 index 0000000..31e839c --- /dev/null +++ b/apps/lang/Makefile @@ -0,0 +1,37 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id: Makefile 15615 2007-11-14 10:31:57Z jethead71 $ +# + +# the header we generate +HEADER = $(BUILDDIR)/max_language_size.h + +# This sets up 'SRC' based on the files mentioned in SOURCES +include $(TOOLSDIR)/makesrc.inc +SOURCES=$(SRC) + +# OUTP is the list of files to depend upon +OUTP = $(patsubst %.lang,$(OBJDIR)/%.lng, $(SOURCES)) + +# the generated file with features specified genlang-style +FEATS=$(BUILDDIR)/apps/genlang-features + +ifndef V +SILENT=@ +endif +PRINTS=$(SILENT)$(call info,$(1)) + +all: $(HEADER) + +# generic rule for creating .lng from .lang +$(OBJDIR)/%.lng : %.lang $(FEATS) + $(call PRINTS,GENLANG $<) + $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(ARCHOS)`cat $(FEATS)` -i=$(TARGET_ID) -b=$@ $< + +$(HEADER): $(OUTP) + $(call PRINTS,Make $(HEADER)) + echo "#define MAX_LANGUAGE_SIZE `du -b $(OBJDIR)/* |sort -n |tail -n 1 |cut -f 1`" > $(HEADER) diff --git a/apps/lang/SOURCES b/apps/lang/SOURCES new file mode 100644 index 0000000..af54646 --- /dev/null +++ b/apps/lang/SOURCES @@ -0,0 +1,35 @@ +#ifdef HAVE_LCD_BITMAP /* Not for the Player */ +*.lang +#else +afrikaans.lang +bulgarian.lang +catala.lang +czech.lang +dansk.lang +deutsch.lang +eesti.lang +english.lang +espanol.lang +esperanto.lang +finnish.lang +francais.lang +galego.lang +greek.lang +hebrew.lang +islenska.lang +italiano.lang +magyar.lang +nederlands.lang +norsk.lang +norsk-nynorsk.lang +polski.lang +portugues-brasileiro.lang +portugues.lang +romaneste.lang +russian.lang +slovenscina.lang +svenska.lang +tagalog.lang +turkce.lang +wallisertitsch.lang +#endif /* HAVE_LCD_BITMAP */ diff --git a/apps/language.h b/apps/language.h index d8f899b..6787dbb 100644 --- a/apps/language.h +++ b/apps/language.h @@ -1,3 +1,5 @@ +#ifndef __LANGUAGE_H +#define __LANGUAGE_H /*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ @@ -7,7 +9,7 @@ * \/ \/ \/ \/ \/ * $Id$ * - * Copyright (C) 2002 Daniel Stenberg + * Copyright (C) 2002, 2008 Daniel Stenberg * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. @@ -17,6 +19,11 @@ * ****************************************************************************/ +/* The following header is generated by the build system and only defines + MAX_LANGUAGE_SIZE to be the size of the largest currently available + language! */ +//#include "max_language_size.h" + /* size of the buffer used for loadable, translated strings */ #define MAX_LANGUAGE_SIZE 23500 @@ -29,3 +36,5 @@ void lang_init(void); /* load a given language file */ int lang_load(const char *filename); + +#endif |