diff --git a/apps/apps.make b/apps/apps.make index 4df3e12d04..bd675578e5 100644 --- a/apps/apps.make +++ b/apps/apps.make @@ -17,6 +17,7 @@ SRC += $(call preprocess, $(APPSDIR)/SOURCES) # features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt $(SILENT)mkdir -p $(BUILDDIR)/apps + $(SILENT)mkdir -p $(BUILDDIR)/lang $(call PRINTS,PP $( $@ -$(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features +$(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; \ perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< - $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ + $(call PRINTS,CC lang_core.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang/lang_core.c -o $@ $(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<)) diff --git a/tools/functions.make b/tools/functions.make index b16bce3088..6748962d6a 100644 --- a/tools/functions.make +++ b/tools/functions.make @@ -32,9 +32,9 @@ c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) mkdepfile = $(shell \ $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \ - sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ + sed -e "s: lang.h: $(BUILDDIR)/lang/lang_core.o:" \ -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ - -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ + -e "s: max_language_size.h: $(BUILDDIR)/lang/max_language_size.h:" \ -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ diff --git a/tools/genlang b/tools/genlang index 9f9e904312..05183b8d67 100755 --- a/tools/genlang +++ b/tools/genlang @@ -535,13 +535,13 @@ if ($sortfile) { if($prefix) { # We create a .c and .h file - open(HFILE, ">$prefix.h") || - die "Error: couldn't create file $prefix.h\n"; - open(CFILE, ">$prefix.c") || - die "Error: couldn't create file $prefix.c\n"; + open(HFILE, ">$prefix/lang.h") || + die "Error: couldn't create file $prefix/lang.h\n"; + open(CFILE, ">$prefix/lang_core.c") || + die "Error: couldn't create file $prefix/lang_core.c\n"; # get header file name - $headername = "$prefix.h"; + $headername = "$prefix/lang.h"; $headername =~ s/(.*\/)*//; print HFILE <