Make it possible to manually rebuild an existing messages.pot using 'make messages'. Don't use the --no-wrap switch for xgettext, since it's not universally supported. Print an explanation if xgettext fails.

darcs-hash:20060118165917-ac50b-2bea9293231907ea373216dbd6097a359886a062.gz
This commit is contained in:
axel 2006-01-19 02:59:17 +10:00
parent 13e94c0617
commit 588bc1103a

View file

@ -223,20 +223,23 @@ doc.h:$(BUILTIN_DOC_SRC) $(CMD_DOC_SRC) doc_src/doc.hdr
fi
# Update existing po file or copy messages.pot
%.po: messages.pot
%.po:messages.pot
if test $(HAVE_GETTEXT) = 1;then \
if test -f $*.po; then \
msgmerge -U --backup=existing --no-wrap $*.po messages.pot;\
msgmerge -U --backup=existing $*.po messages.pot;\
else \
cp messages.pot $*.po;\
fi; \
fi
# Create a template translation object
messages.pot:
messages messages.pot:
if test $(HAVE_GETTEXT) = 1;then \
xgettext -k_ -kN_ -kcomplete_desc --no-wrap *.c *.h -o messages.pot; \
xgettext -j -k_ -LShell --no-wrap init/*.in init/*.fish init/completions/*.fish -o messages.pot; \
xgettext -k_ -kN_ -kcomplete_desc *.c *.h -o messages.pot; \
if ! xgettext -j -k_ -LShell init/*.in init/*.fish init/completions/*.fish -o messages.pot; then \
echo "Your xgettext version is too old to build the messages.pot file"\
false;\
fi; \
fi
# Generate the internal help functions by making doxygen create