Navigation Menu

Skip to content

Commit

Permalink
doc: generate .edit by just make
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 14, 2014
1 parent d857f0f commit 0c95c0b
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions build/makefiles/gettext.am
Expand Up @@ -21,7 +21,16 @@ SUFFIXES += .pot .po .mo .edit
all:

.pot.edit:
msgmerge --quiet --sort-by-file --output-file=$@ $*.po $<
if test -f $@.po; then \
msgmerge --quiet --sort-by-file --output-file=$@ $*.po $<; \
else \
msginit \
--input=$< \
--output-file=$@ \
--locale=$(LOCALE) \
--no-translator; \
fi

.edit.po:
msgcat --no-location --output $@ $*.edit
.po.mo:
Expand Down Expand Up @@ -52,17 +61,6 @@ init: gettext
:; \
done

edit:
for pot in *.pot; do \
edit_po=`basename $${pot} | sed -e 's,pot$$,edit,g'`; \
po=`basename $${pot} | sed -e 's,pot$$,po,g'`; \
test ! -f $${edit_po} && test -f $${po} && \
msgmerge --quiet --sort-by-file --output-file=$${edit_po} $${po} $${pot}; \
test ! -f $${edit_po} && test ! -f $${po} && \
msginit --input=$${pot} --output-file=$${edit_po} --locale=$(LOCALE); \
:; \
done

reinit:
$(MAKE) FORCE_INIT=yes init

Expand All @@ -71,5 +69,5 @@ pot-build-stamp: $(absolute_source_files)
@touch $@

edit-po-build-stamp: $(absolute_source_files)
$(MAKE) edit
$(MAKE) $(edit_po_files)
@touch $@

0 comments on commit 0c95c0b

Please sign in to comment.