From a57a2d9acfc2a36084d2f322f5089203ae89fc9e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 10 Sep 2012 11:55:52 +0200 Subject: [PATCH] Streamline a bit po/Rules-lyx Make use of normal and automatic variables to avoid repetition. Things could be made shorter by using the %_l10n.pot pattern (GNU make extension). --- po/Rules-lyx | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/po/Rules-lyx b/po/Rules-lyx index 28ef56a1b9..9ea79193a1 100644 --- a/po/Rules-lyx +++ b/po/Rules-lyx @@ -17,42 +17,41 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS) && mv $@-t $@ l10n_pots: qt4_l10n.pot layouts_l10n.pot languages_l10n.pot latexfonts_l10n.pot encodings_l10n.pot ui_l10n.pot external_l10n.pot formats_l10n.pot - cat $^ | \ - msguniq -o $(DOMAIN).po && rm -f $^ + cat $^ | msguniq -o $(DOMAIN).po +LYX_POT = LC_ALL=C ; export LC_ALL ; \ + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui - LC_ALL=C ; export LC_ALL ; \ - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t qt4 ${top_srcdir}/src/frontends/qt4/ui/*.ui + $(LYX_POT) -o $@ -t qt4 $^ -layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc \ +layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout \ + $(top_srcdir)/lib/layouts/*.inc \ $(top_srcdir)/lib/layouts/*.module - LC_ALL=C ; export LC_ALL ; \ - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouts ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module + $(LYX_POT) -o $@ -t layouts $^ +#FIXME: I am not sure what this does. Why read the po files in this case? $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \ - $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module - LC_ALL=C ; export LC_ALL ; \ - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module + $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module + $(LYX_POT) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module languages_l10n.pot: $(top_srcdir)/lib/languages - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t languages ${top_srcdir}/lib/languages + $(LYX_POT) -o $@ -t languages $^ latexfonts_l10n.pot: $(top_srcdir)/lib/latexfonts - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t latexfonts ${top_srcdir}/lib/latexfonts + $(LYX_POT) -o $@ -t latexfonts $^ encodings_l10n.pot: $(top_srcdir)/lib/encodings - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t encodings ${top_srcdir}/lib/encodings + $(LYX_POT) -o $@ -t encodings $^ ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc - LC_ALL=C ; export LC_ALL ; \ - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t ui ${top_srcdir}/lib/ui/*.ui ${top_srcdir}/lib/ui/*.inc + $(LYX_POT) -o $@ -t ui $^ external_l10n.pot: $(top_srcdir)/lib/external_templates - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t external ${top_srcdir}/lib/external_templates + $(LYX_POT) -o $@ -t external $^ formats_l10n.pot: $(top_srcdir)/lib/configure.py - $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t formats ${top_srcdir}/lib/configure.py + $(LYX_POT) -o $@ -t formats $^ # LyX specific code to generate l10n statistics for the web site i18n.inc: $(POFILES) postats.py