summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-17 23:12:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-17 23:12:54 +0000
commit4a06c87e7869bb2703c0b0181d3816ba73dff9ff (patch)
tree5d9c1ea2e534337d548ec97568a23615a56e9d1b /tools
parent8c81e789cc7da214db5a5c1a3aa3698375a400e3 (diff)
downloadrockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.tar.gz
rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.zip
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 'tools')
-rwxr-xr-xtools/buildzip.pl35
-rwxr-xr-xtools/configure10
-rw-r--r--tools/make.inc3
-rw-r--r--tools/makesrc.inc4
4 files changed, 13 insertions, 39 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 4c21ae819f..4faa38ac54 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -154,30 +154,6 @@ sub filesize {
154 return $size; 154 return $size;
155} 155}
156 156
157sub buildlangs {
158 my ($outputlang)=@_;
159 my $dir = "$ROOT/apps/lang";
160 opendir(DIR, $dir);
161 my @files = grep { /\.lang$/ } readdir(DIR);
162 closedir(DIR);
163
164 # Exclude some bad languages (uncomment and adjust in case of release
165 # and/or End Times)
166 # @files = grep(!/(afrikaans|hindi|slovenscina|turkce)\.lang/, @files);
167
168 # Exclude more languages on the player which won't work on charcell display
169 if ($archos =~ /^"?player:/ ) {
170 @files = grep(!/(chinese-simp|chinese-trad|hindi|japanese|korean|thai)\.lang/, @files);
171 }
172
173 for(@files) {
174 my $output = $_;
175 $output =~ s/(.*)\.lang/$1.lng/;
176 print "$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_\n" if($verbose);
177 system ("$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_ >/dev/null 2>&1");
178 }
179}
180
181sub buildzip { 157sub buildzip {
182 my ($zip, $image, $fonts)=@_; 158 my ($zip, $image, $fonts)=@_;
183 159
@@ -413,15 +389,8 @@ STOP
413 # and the info file 389 # and the info file
414 system("cp rockbox-info.txt .rockbox/"); 390 system("cp rockbox-info.txt .rockbox/");
415 391
416 # now copy the file made for reading on the unit: 392 # copy the already built lng files
417 #if($notplayer) { 393 `cp apps/lang/*lng .rockbox/langs/`
418 # `cp $webroot/docs/Help-JBR.txt .rockbox/docs/`;
419 #}
420 #else {
421 # `cp $webroot/docs/Help-Stu.txt .rockbox/docs/`;
422 #}
423
424 buildlangs(".rockbox/langs");
425 394
426} 395}
427 396
diff --git a/tools/configure b/tools/configure
index 49773e1a6f..b46f175f6a 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1919,14 +1919,14 @@ export ENCODER=@ENCODER@
1919# Do not print "Entering directory ..." 1919# Do not print "Entering directory ..."
1920MAKEFLAGS += --no-print-directory 1920MAKEFLAGS += --no-print-directory
1921 1921
1922.PHONY: all clean tags zip tools manual bin build info 1922.PHONY: all clean tags zip tools manual bin build info langs
1923 1923
1924all: info 1924all: info
1925 1925
1926info: build 1926info: build
1927 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt 1927 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1928 1928
1929build: tools 1929build: tools langs
1930 @SIMUL1@ 1930 @SIMUL1@
1931 @SIMUL2@ 1931 @SIMUL2@
1932 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware 1932 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
@@ -1952,7 +1952,7 @@ clean:
1952 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \ 1952 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1953 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \ 1953 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1954 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \ 1954 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1955 voicefontids *.wav *.mp3 *.voice 1955 voicefontids *.wav *.mp3 *.voice max_language_size.h
1956 1956
1957tools: 1957tools:
1958 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@ 1958 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
@@ -1996,6 +1996,10 @@ bzip2: tar
1996gzip: tar 1996gzip: tar
1997 \$(SILENT)gzip -f9 rockbox.tar 1997 \$(SILENT)gzip -f9 rockbox.tar
1998 1998
1999langs: features
2000 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2001 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2002
1999manual: manual-pdf 2003manual: manual-pdf
2000manual-pdf: 2004manual-pdf:
2001 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf 2005 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
diff --git a/tools/make.inc b/tools/make.inc
index 8e125c834e..30d0779b2d 100644
--- a/tools/make.inc
+++ b/tools/make.inc
@@ -40,7 +40,8 @@ $(DEPFILE): $(SOURCES)
40 rm $$del; \ 40 rm $$del; \
41 del=""; \ 41 del=""; \
42 fi \ 42 fi \
43 done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang.o:" > $(DEPFILE); \ 43 done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang.o:" \
44 -e "s:[^[:space:]]*sysfont.h:$(BUILDDIR)/sysfont.h:" > $(DEPFILE); \
44 echo "oo" > /dev/null ) 45 echo "oo" > /dev/null )
45 46
46tags: 47tags:
diff --git a/tools/makesrc.inc b/tools/makesrc.inc
index 78d97f3283..846df8cb9e 100644
--- a/tools/makesrc.inc
+++ b/tools/makesrc.inc
@@ -10,5 +10,5 @@
10# to make this do right when used on Mac OS X. 10# to make this do right when used on Mac OS X.
11 11
12SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ 12SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
13$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - | \ 13$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \
14grep -v "^\#") 14| grep -v "^\#")