mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
make: add a variable 'DOMAIN' for the name of the pot and mo files
Having the name of the domain hard-coded in many places in the makefiles makes it harder to maintain them, specially because much code is duplicated between the makefiles that handle po files. There is now the variable DOMAIN that is set once in each concerned makefile, and the rest of the makefile makes use of it. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
c72f013136
commit
bb544439f4
@@ -1,8 +1,10 @@
|
||||
DOMAIN = WINGs
|
||||
|
||||
nlsdir = $(NLSDIR)
|
||||
|
||||
CATALOGS = @WINGSMOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS) WINGs.pot
|
||||
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po hu.po nl.po sk.po
|
||||
|
||||
@@ -77,13 +79,13 @@ SUFFIXES = .po .mo
|
||||
|
||||
all-local: $(CATALOGS)
|
||||
|
||||
WINGs.pot: $(POTFILES)
|
||||
xgettext --default-domain=WINGs \
|
||||
$(DOMAIN).pot: $(POTFILES)
|
||||
xgettext --default-domain=$(DOMAIN) \
|
||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||
if cmp -s WINGs.po WINGs.pot; then \
|
||||
rm -f WINGs.po; \
|
||||
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
|
||||
rm -f $(DOMAIN).po; \
|
||||
else \
|
||||
mv -f WINGs.po WINGs.pot; \
|
||||
mv -f $(DOMAIN).po $(DOMAIN).pot; \
|
||||
fi
|
||||
|
||||
install-data-local: $(CATALOGS)
|
||||
@@ -92,7 +94,7 @@ install-data-local: $(CATALOGS)
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WINGs.mo; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
DOMAIN = WPrefs
|
||||
|
||||
CATALOGS = @WPMOFILES@
|
||||
|
||||
nlsdir = $(NLSDIR)
|
||||
|
||||
CLEANFILES = WPrefs.pot $(CATALOGS)
|
||||
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
|
||||
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po es.po et.po fi.po fr.po hr.po hu.po \
|
||||
it.po ja.po ko.po nl.po pt.po ru.po sk.po zh_CN.po zh_TW.po
|
||||
@@ -43,13 +45,13 @@ SUFFIXES = .po .mo
|
||||
|
||||
all-local: $(CATALOGS)
|
||||
|
||||
WPrefs.pot: $(POTFILES)
|
||||
xgettext --default-domain=WPrefs \
|
||||
$(DOMAIN).pot: $(POTFILES)
|
||||
xgettext --default-domain=$(DOMAIN) \
|
||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||
if cmp -s WPrefs.po WPrefs.pot; then \
|
||||
rm -f WPrefs.po; \
|
||||
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
|
||||
rm -f $(DOMAIN).po; \
|
||||
else \
|
||||
mv -f WPrefs.po WPrefs.pot; \
|
||||
mv -f $(DOMAIN).po $(DOMAIN).pot; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -59,7 +61,7 @@ install-data-local: $(CATALOGS)
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WPrefs.mo; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
DOMAIN = WindowMaker
|
||||
|
||||
nlsdir = $(NLSDIR)
|
||||
|
||||
CATALOGS = @MOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS) WindowMaker.pot
|
||||
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||
|
||||
# Please keep this sorted in alphabetic order!
|
||||
EXTRA_DIST = be.po bg.po bs.po ca.po cs.po da.po de.po el.po es.po et.po \
|
||||
@@ -72,13 +74,13 @@ SUFFIXES = .po .mo
|
||||
|
||||
all-local: $(CATALOGS)
|
||||
|
||||
WindowMaker.pot: $(POTFILES)
|
||||
xgettext --default-domain=WindowMaker \
|
||||
$(DOMAIN).pot: $(POTFILES)
|
||||
xgettext --default-domain=$(DOMAIN) \
|
||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||
if cmp -s WindowMaker.po WindowMaker.pot; then \
|
||||
rm -f WindowMaker.po; \
|
||||
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
|
||||
rm -f $(DOMAIN).po; \
|
||||
else \
|
||||
mv -f WindowMaker.po WindowMaker.pot; \
|
||||
mv -f $(DOMAIN).po $(DOMAIN).pot; \
|
||||
fi
|
||||
|
||||
install-data-local: $(CATALOGS)
|
||||
@@ -87,7 +89,7 @@ install-data-local: $(CATALOGS)
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WindowMaker.mo; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
DOMAIN = wmgenmenu
|
||||
|
||||
CATALOGS = @UTILMOFILES@
|
||||
|
||||
nlsdir = $(NLSDIR)
|
||||
|
||||
CLEANFILES = wmgenmenu.pot $(CATALOGS)
|
||||
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
|
||||
|
||||
EXTRA_DIST = de.po es.po fr.po nl.po pt.po
|
||||
|
||||
@@ -18,13 +20,13 @@ SUFFIXES = .po .mo
|
||||
|
||||
all-local: $(CATALOGS)
|
||||
|
||||
wmgenmenu.pot: $(POTFILES)
|
||||
xgettext --default-domain=wmgenmenu \
|
||||
$(DOMAIN).pot: $(POTFILES)
|
||||
xgettext --default-domain=$(DOMAIN) \
|
||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||
if cmp -s wmgenmenu.po wmgenmenu.pot; then \
|
||||
rm -f wmgenmenu.po; \
|
||||
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
|
||||
rm -f $(DOMAIN).po; \
|
||||
else \
|
||||
mv -f wmgenmenu.po wmgenmenu.pot; \
|
||||
mv -f $(DOMAIN).po $(DOMAIN).pot; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -34,6 +36,6 @@ install-data-local: $(CATALOGS)
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/wmgenmenu.mo; \
|
||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user