"Fossies" - the Fresh Open Source Software Archive

Member "whois/po/Makefile" (3 Oct 2020, 1335 Bytes) of package /linux/privat/whois_5.5.9.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile": 5.5.6_vs_5.5.8.

    1 prefix = /usr
    2 
    3 ifdef DESTDIR
    4 BASEDIR := $(DESTDIR)
    5 endif
    6 
    7 INSTALL= install
    8 
    9 INSTALLNLSDIR=$(BASEDIR)$(prefix)/share/locale
   10 
   11 PACKAGE = whois
   12 
   13 CATALOGS = cs.mo da.mo de.mo el.mo es.mo eu.mo fi.mo fr.mo it.mo ja.mo pl.mo pt_BR.mo ru.mo zh_CN.mo
   14 
   15 POTFILES=../whois.c ../mkpasswd.c
   16 
   17 all: $(PACKAGE).pot $(CATALOGS)
   18 
   19 $(PACKAGE).pot: $(POTFILES)
   20 	xgettext --default-domain=$(PACKAGE) \
   21        	  --add-comments --keyword=_ --keyword=N_ $(POTFILES)
   22 	if cmp -s $(PACKAGE).po $(PACKAGE).pot; then \
   23 	  rm -f $(PACKAGE).po; \
   24 	else \
   25 	  mv $(PACKAGE).po $(PACKAGE).pot; \
   26 	fi
   27 
   28 update-po: $(PACKAGE).pot
   29 	for cat in $(CATALOGS); do \
   30 	  lang=`echo $$cat | sed 's/.mo$$//'`; \
   31 	  mv $$lang.po $$lang.old.po; \
   32 	  echo "$$lang:"; \
   33 	  if msgmerge $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
   34 	    rm -f $$lang.old.po; \
   35 	  else \
   36     	    echo "msgmerge for $$cat failed!"; \
   37 	    rm -f $$lang.po; mv $$lang.old.po $$lang.po; \
   38 	  fi; \
   39 	done
   40 
   41 %.mo: %.po
   42 	msgfmt --statistics --check --verbose --output-file=$@ $<
   43 
   44 clean:
   45 	rm -f *.mo
   46 
   47 distclean: clean
   48 	rm -f whois.pot
   49 
   50 install: $(CATALOGS)
   51 	for n in $(CATALOGS); do \
   52 	    l=`basename $$n .mo`; \
   53 	    $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
   54 	    $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
   55 	    $(INSTALL) -m 644 $$n $(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(PACKAGE).mo; \
   56 	done
   57