Add a macro to split and install messages files, and have gtk front end use it.

This commit is contained in:
Rob Kendrick (monotony) 2012-11-03 11:16:33 +00:00
parent de074a3ada
commit 118b03a786
2 changed files with 10 additions and 0 deletions

View File

@ -644,6 +644,15 @@ clean: $(CLEANS)
# Target builds a distribution package
package: all-program package-$(TARGET)
FAT_LANGUAGES=de en fr it nl
# 1 = front end name (gtk, ro, ami, etc)
# 2 = Destination directory (where resources being installed, creates en/Messages etc)
define split_install_messages
$(foreach LANG, $(FAT_LANGUAGES), @echo MSGSPLIT: $(1)/$(LANG) to $(2)
$(Q)$(PERL) utils/split-messages.pl $(LANG) $(1) < resources/FatMessages > $(2)/$(LANG)/Messages
)
endef
# Target installs executable on the host system
install: all-program install-$(TARGET)

View File

@ -155,6 +155,7 @@ install-gtk:
@tar cf - -h -C gtk/res themes | tar xf - -C $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@# Install translations
@tar cf - -h -C gtk/res C de en fr it nl | tar xf - -C $(DESTDIR)$(NETSURF_GTK_RESOURCES)
$(call split_install_messages, gtk, $(DESTDIR)$(NETSURF_GTK_RESOURCES))
@# Install glade templates
@cp -RLv gtk/res/*.gtk*.ui $(DESTDIR)$(NETSURF_GTK_RESOURCES)