diff options
author | Henrik Brautaset Aronsen <subsurface@henrik.synth.no> | 2012-10-11 12:06:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-11 21:45:30 +0900 |
commit | f5de37dbcfa549913c360c26491b8264457fa59a (patch) | |
tree | 23aa31e5cf2f6940be775e2b19efda29f609c76f /Makefile | |
parent | 870978331e5aeaf9dd9d9f250e715e65197bc131 (diff) | |
download | subsurface-f5de37dbcfa549913c360c26491b8264457fa59a.tar.gz |
Basic gettext support when building
Added basic support for building gettext locales in the Makefile.
The po file name should match the target locale.
[Dirk Hohndel: Used git mv to rename the German .po file]
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -122,7 +122,7 @@ OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o \ parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o \ gtk-gui.o statistics.o file.o cochran.o $(OSSUPPORT).o $(RESFILE) -$(NAME): $(OBJS) +$(NAME): $(OBJS) gettext $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS) install: $(NAME) @@ -211,8 +211,16 @@ uemis-downloader.o: uemis-downloader.c dive.h uemis.h $(OSSUPPORT).o: $(OSSUPPORT).c display-gtk.h $(CC) $(CFLAGS) $(OSSUPPORT_CFLAGS) -c $(OSSUPPORT).c +gettext: po/*.po + @for MSG in $(wildcard po/*.po); do \ + LOC=`basename $$MSG .po`; \ + mkdir -p locale/$$LOC.UTF-8/LC_MESSAGES; \ + msgfmt -c -o locale/$$LOC.UTF-8/LC_MESSAGES/subsurface.mo $$MSG; \ + done + doc: $(MAKE) -C Documentation doc clean: rm -f $(OBJS) *~ $(NAME) $(NAME).exe + rm -rf locale |