Build updates for po i18n.
This commit is contained in:
parent
211df6d8ec
commit
ef458b4041
|
@ -3,6 +3,7 @@
|
|||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
*.mo
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
VERSION = 0.6
|
||||
REVISION = $(shell date +"%y%m%d")
|
||||
LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
|
||||
|
||||
SEARCHPATH += src/ src/battle src/challenges src/draw src/game src/galaxy src/json src/system src/test
|
||||
vpath %.c $(SEARCHPATH)
|
||||
|
@ -28,12 +29,15 @@ OBJS += util.o
|
|||
OBJS += waypoints.o widgets.o
|
||||
|
||||
# top-level rule to create the program.
|
||||
all: $(PROG)
|
||||
all: $(PROG) $(LOCALE_MO)
|
||||
|
||||
# compiling other source files.
|
||||
%.o: %.c %.h $(DEPS)
|
||||
$(CC) $(CFLAGS) $(CXXFLAGS) -c $<
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
|
||||
# cleaning everything that can be automatically recreated with "make".
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROG)
|
||||
$(RM) $(OBJS) $(PROG) $(LOCALE_MO)
|
||||
|
|
11
makefile
11
makefile
|
@ -30,9 +30,20 @@ install:
|
|||
cp -r music $(DATA_DIR)
|
||||
cp -r sound $(DATA_DIR)
|
||||
|
||||
@for f in $(LOCALE_MO); do \
|
||||
lang=`echo $$f | sed -e 's/^locale\///;s/\.mo$$//'`; \
|
||||
mkdir -p $(LOCALE_DIR)/$$lang/LC_MESSAGES; \
|
||||
cp -v $$f $(LOCALE_DIR)/$$lang/LC_MESSAGES/$(PROG).mo; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
$(RM) $(BIN_DIR)/$(PROG)
|
||||
$(RM) -rf $(DATA_DIR)
|
||||
|
||||
@for f in $(LOCALE_MO); do \
|
||||
lang=`echo $$f | sed -e 's/^locale\///;s/\.mo$$//'`; \
|
||||
$(RM) -v $(LOCALE_DIR)/$$lang/LC_MESSAGES/$(PROG).mo; \
|
||||
done
|
||||
|
||||
# prepare an archive for the program
|
||||
dist:
|
||||
|
|
Loading…
Reference in New Issue