#~~syntax:makefile
#==============================================================================
# ttyrpld - TTY replay daemon
#   Copyright © Jan Engelhardt <jengelh [at] linux01 gwdg de>, 2004 - 2005
#   -- License restrictions apply (GPL v2)
#
#   This file is part of ttyrpld.
#   ttyrpld is free software; you can redistribute it and/or modify it
#   under the terms of the GNU General Public License as published by
#   the Free Software Foundation; however ONLY version 2 of the License.
#
#   ttyrpld is distributed in the hope that it will be useful, but
#   WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#   General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program kit; if not, write to:
#   Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#   02111-1307, USA.
#
#   -- For details see the COPYING file
#==============================================================================

LOCALE_PATH := /usr/local/share/locale
# Installs from distributions should use this:
#LOCALE_PATH := /usr/share/locale

ALL_MO := $(patsubst %.po,%.mo,$(wildcard */LC_MESSAGES/*.po))

all: ${ALL_MO};

%.mo: %.po;
	@echo -en "$@: ";
	@msgfmt --statistics -o $@ $<;

install: all;
	for i in *; do \
          [ ! -d "$$i" ] && continue; \
          install -dm0755 -o root -g root "/usr/local/share/locale/$$i/LC_MESSAGES"; \
          install -m0644 -o root -g root "$$i/LC_MESSAGES/ttyrpld.mo" "/usr/local/share/locale/$$i/LC_MESSAGES/"; \
        done;

uninstall: ;
	rm -f /usr/local/share/locale/*/LC_MESSAGES/ttyrpld.mo;

clean: ;
	rm -f ${ALL_MO};

#==[ End of file ]=============================================================
