procps/man-po/Makefile.am

38 lines
996 B
Makefile
Raw Normal View History

# *.po and *.pot are kept in VCS and generated by po4a-dist command
# translated/* are put in distribution but not found in VCS
#
# run:
# make -C man-po po4a-dist
# To update man page translations
translated_MANS = $(wildcard translated/*/*.[1-9])
translated_MAN_sections=$(subst .,,$(sort $(suffix $(translated_MANS))))
translated_langs = $(notdir $(wildcard translated/*))
EXTRA_DIST = po4a.cfg $(translated_MANS)
if USE_PO4A
po4a-dist:
-@po4a -M utf-8 -k 0 po4a.cfg
endif
install-data-local:
for l in $(translated_langs) ; do \
for sect in $(translated_MAN_sections) ; do \
manpages=`ls translated/$$l/*.$$sect 2>/dev/null` ; \
if [ -n "$$manpages" ] ; then \
$(MKDIR_P) $(DESTDIR)$(mandir)/$$l/man$$sect ; \
for file in `ls translated/$$l/*.$$sect` ; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/$$l/man$$sect ; \
done ; \
fi ; \
done ; \
done
.PHONY = translated_langs po4a-dist