summaryrefslogtreecommitdiffstats
path: root/apps/lang/lang.make
diff options
context:
space:
mode:
Diffstat (limited to 'apps/lang/lang.make')
-rw-r--r--apps/lang/lang.make7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/lang/lang.make b/apps/lang/lang.make
index e32f084a29..f7366c9225 100644
--- a/apps/lang/lang.make
+++ b/apps/lang/lang.make
@@ -18,9 +18,14 @@ CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang*
# Therefore we create it here.
#DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang)
+# Calculate the maximum language size. Currently based on the file size
+# of the largest lng file. Subtract 10 due to HEADER_SIZE and
+# SUBHEADER_SIZE.
+# TODO: In the future generate this file within genlang or another script
+# in order to only calculate the maximum size based on the core strings.
$(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ)
$(call PRINTS,Create $(notdir $@))
- $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@
+ $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5-10}' | sort -n | tail -1`" > $@
$(BUILDDIR)/lang/lang_core.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features
$(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \