diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-08-05 19:19:39 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-08-05 19:19:39 +0000 |
commit | b3113674819cd8daf44750d129c5d8298e830df0 (patch) | |
tree | ebc7ec9e096e309ef79834802eed28ff9c22fd41 /apps/Makefile | |
parent | e70f7f4ca857e9e88a6e076360b6c9c235d7739b (diff) | |
download | rockbox-b3113674819cd8daf44750d129c5d8298e830df0.tar.gz rockbox-b3113674819cd8daf44750d129c5d8298e830df0.zip |
*** Lang v2 cleanup (FS#6574) ***
1) Introduces apps/features.txt that controls which strings are included
for each target based on defines.
2) .lng and .voice files are now target specific and the format versions
of both these file types have been bumped, which means that new voice
files are needed.
3) Use the 'features' mechanism to exclude strings for targets that
didn't use them.
4) Delete unused and deprecated and duplicated strings, sort strings in
english.lang
Some string IDs were changed so translations will be slightly worse than
before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/Makefile')
-rw-r--r-- | apps/Makefile | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/apps/Makefile b/apps/Makefile index 69de3a0f78..0b8f0ad304 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -90,6 +90,8 @@ $(DEPFILE): $(BITMAPLIBS) | |||
90 | 90 | ||
91 | dep: $(DEPFILE) | 91 | dep: $(DEPFILE) |
92 | 92 | ||
93 | features: $(OBJDIR)/features | ||
94 | |||
93 | build-codecs: | 95 | build-codecs: |
94 | $(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib | 96 | $(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib |
95 | $(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs | 97 | $(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs |
@@ -195,9 +197,22 @@ $(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin | |||
195 | 197 | ||
196 | include $(TOOLSDIR)/make.inc | 198 | include $(TOOLSDIR)/make.inc |
197 | 199 | ||
198 | $(OBJDIR)/lang.o: lang/$(LANGUAGE).lang | 200 | # apps/features.txt is a file that (is preprocessed and) lists named features |
199 | @mkdir -p $(dir $@) | 201 | # based on defines in the config-*.h files. The named features will be passed |
200 | $(call PRINTS,GENLANG)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $< | 202 | # to genlang and thus (translated) phrases can be used based on those names. |
203 | # button.h is included for the HAS_BUTTON_HOLD define. | ||
204 | # | ||
205 | |||
206 | $(OBJDIR)/features: features.txt | ||
207 | $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ | ||
208 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \ | ||
209 | grep -v "^\#" | grep -v "^$$" > $@; \ | ||
210 | echo "" >/dev/null | ||
211 | |||
212 | $(OBJDIR)/lang.o: lang/$(LANGUAGE).lang $(OBJDIR)/features | ||
213 | $(SILENT)mkdir -p `dirname $@` | ||
214 | $(SILENT)for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done; \ | ||
215 | perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS):$$feat $< | ||
201 | $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ | 216 | $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ |
202 | 217 | ||
203 | clean: | 218 | clean: |