Update of /cvsroot/subproc/subproc
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27347
Added Files:
Makefile
Log Message:
Makefile added.
--- NEW FILE: Makefile ---
# Subproc Makefile
# $Id: Makefile,v 1.1 2007/02/28 15:57:11 cstroie Exp $
NAME = subproc
VERSION = 0.1
# Supported languages
LANGUAGES = ro de fr es it
# Translation catalogs, directories and files
PO_DIR = po
POT = $(PO_DIR)/$(NAME).pot
POT_HEADER = $(PO_DIR)/header.pot
PO_FILES = $(addprefix $(PO_DIR)/, $(addsuffix .po, $(LANGUAGES)))
MO_FILES = $(addprefix $(TEXTDOMAINDIR)/, $(addsuffix /$(CATEGORY)/$(TEXTDOMAIN).mo, $(LANGUAGES)))
MO_DIRS = $(addprefix $(TEXTDOMAINDIR)/, $(addsuffix /$(CATEGORY), $(LANGUAGES)))
# Localization settings
TEXTDOMAIN = $(NAME)
TEXTDOMAINDIR = messages
CATEGORY = LC_MESSAGES
all:
# Create the pot file
pot: $(POT)
$(PO_DIR)/%.pot: % $(POT_HEADER)
cat $(POT_HEADER) | \
sed "/POT-Creation-Date:/s/DATE/`date "+%Y-%m-%d %H:%M%z"`/g" | \
sed "/Project-Id-Version:/s/NAME-VERSION/$(NAME)-$(VERSION)/g" > $@
gawk --gen-po -f $< | msguniq >> $@
# Update the existing catalogs
po: $(PO_FILES)
$(PO_DIR)/%.po: $(POT)
test -f $@ && \
msgmerge --update --backup=simple --suffix=.bak --force-po --no-wrap --sort-by-file $@ $< || \
msginit -i $< -o $@ -l $* --no-translator --no-wrap
# Make the mo files
mo: $(MO_DIRS) $(MO_FILES)
$(TEXTDOMAINDIR)/%/$(CATEGORY)/$(TEXTDOMAIN).mo: $(PO_DIR)/%.po
msgfmt --check --statistics -o $@ $<
# Output directories
$(MO_DIRS):
mkdir -p $@
# vim: set ft=make nowrap nu:
|