1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-14 18:44:13 +01:00
Files
wmaker/po/Makefile.am
Christophe CURIS bb544439f4 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>
2015-01-20 21:29:24 +00:00

106 lines
3.1 KiB
Makefile

DOMAIN = WindowMaker
nlsdir = $(NLSDIR)
CATALOGS = @MOFILES@
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 \
fi.po fr.po gl.po hr.po hu.po hy.po it.po ja.po ko.po ms.po nl.po \
no.po pl.po pt.po ro.po ru.po sk.po sv.po tr.po zh_CN.po zh_TW.po
POTFILES = \
$(top_srcdir)/src/actions.c \
$(top_srcdir)/src/appicon.c \
$(top_srcdir)/src/application.c \
$(top_srcdir)/src/appmenu.c \
$(top_srcdir)/src/balloon.c \
$(top_srcdir)/src/client.c \
$(top_srcdir)/src/colormap.c \
$(top_srcdir)/src/cycling.c \
$(top_srcdir)/src/defaults.c \
$(top_srcdir)/src/dialog.c \
$(top_srcdir)/src/dock.c \
$(top_srcdir)/src/dockedapp.c \
$(top_srcdir)/src/event.c \
$(top_srcdir)/src/framewin.c \
$(top_srcdir)/src/geomview.c \
$(top_srcdir)/src/icon.c \
$(top_srcdir)/src/main.c \
$(top_srcdir)/src/menu.c \
$(top_srcdir)/src/misc.c \
$(top_srcdir)/src/monitor.c \
$(top_srcdir)/src/motif.c \
$(top_srcdir)/src/moveres.c \
$(top_srcdir)/src/osdep_bsd.c \
$(top_srcdir)/src/osdep_darwin.c \
$(top_srcdir)/src/osdep_linux.c \
$(top_srcdir)/src/osdep_stub.c \
$(top_srcdir)/src/pixmap.c \
$(top_srcdir)/src/placement.c \
$(top_srcdir)/src/properties.c \
$(top_srcdir)/src/resources.c \
$(top_srcdir)/src/rootmenu.c \
$(top_srcdir)/src/screen.c \
$(top_srcdir)/src/session.c \
$(top_srcdir)/src/shutdown.c \
$(top_srcdir)/src/stacking.c \
$(top_srcdir)/src/startup.c \
$(top_srcdir)/src/superfluous.c \
$(top_srcdir)/src/switchpanel.c \
$(top_srcdir)/src/switchmenu.c \
$(top_srcdir)/src/texture.c \
$(top_srcdir)/src/usermenu.c \
$(top_srcdir)/src/wcore.c \
$(top_srcdir)/src/wdefaults.c \
$(top_srcdir)/src/window.c \
$(top_srcdir)/src/winmenu.c \
$(top_srcdir)/src/winspector.c \
$(top_srcdir)/src/wmspec.c \
$(top_srcdir)/src/workspace.c \
$(top_srcdir)/src/wsmap.c \
$(top_srcdir)/src/xdnd.c \
$(top_srcdir)/src/xinerama.c \
$(top_srcdir)/src/xmodifier.c \
$(top_srcdir)/src/xutil.c
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
all-local: $(CATALOGS)
$(DOMAIN).pot: $(POTFILES)
xgettext --default-domain=$(DOMAIN) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
rm -f $(DOMAIN).po; \
else \
mv -f $(DOMAIN).po $(DOMAIN).pot; \
fi
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(DESTDIR)$(nlsdir)
for n in $(CATALOGS) __DuMmY ; do \
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/$(DOMAIN).mo; \
fi; \
done
# Create a 'silent rule' for our make check the same way automake does
AM_V_CHKTRANS = $(am__v_CHKTRANS_$(V))
am__v_CHKTRANS_ = $(am__v_CHKTRANS_$(AM_DEFAULT_VERBOSITY))
am__v_CHKTRANS_0 = @echo " CHK translations" ;
am__v_CHKTRANS_1 =
# 'make check' will make sure the tranlation sources are in line with the compiled source
check-local:
$(AM_V_CHKTRANS)$(top_srcdir)/script/check-translation-sources.sh \
"$(srcdir)" -s "$(top_srcdir)/src/Makefile.am" -v wmaker_SOURCES