INSTALL=/usr/bin/install -c
INSTALLNLSDIR=/usr/share/locale

PACKAGE = aldo

CATALOGS = it.mo de.mo

aldo: $(CATALOGS)

%.mo: %.po
	msgfmt --statistics --check --verbose --output-file=$@ $<

clean:
	@rm -f *.mo

install: $(CATALOGS)
	@for n in $(CATALOGS); do \
	    l=`basename $$n .mo`; \
	    $(INSTALL) -m755 -d $(INSTALLNLSDIR)/$$l; \
	    $(INSTALL) -m755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
	    $(INSTALL) -m644 $$n $(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(PACKAGE).mo; \
	done

uninstall:
	@for n in $(CATALOGS); do \
	    l=`basename $$n .mo`; \
	    $(RM) $(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(PACKAGE).mo; \
	done