Makefile
上传用户:tianjinjs
上传日期:2007-01-05
资源大小:309k
文件大小:2k
- INSTALL= /usr/bin/install -c
- INSTALL_PROGRAM= ${INSTALL}
- INSTALL_DATA= ${INSTALL} -m 644
- INSTALLNLSDIR=/usr/share/locale
- MSGMERGE = msgmerge
- NLSPACKAGE = minicom
- CATALOGS = pt_BR.mo fi_FI.mo ja_JP.ujis.mo ja_JP.sjis.mo fr.mo pl.mo ko.mo
- POTFILES=../main.c ../minicom.c ../config.c ../updown.c ../dial.c
- ../help.c ../rwconf.c ../file.c ../getsdir.c ../ipc.c
- ../script.c ../windiv.c
- all: $(NLSPACKAGE).pot $(CATALOGS)
- $(NLSPACKAGE).pot: $(POTFILES)
- xgettext --default-domain=$(NLSPACKAGE)
- --add-comments --keyword=_ --keyword=N_ $(POTFILES)
- if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then
- rm -f $(NLSPACKAGE).po;
- else
- mv $(NLSPACKAGE).po $(NLSPACKAGE).pot;
- fi
- update-po: Makefile ja_JP.sjis.po
- $(MAKE) $(NLSPACKAGE).pot
- catalogs='$(CATALOGS)';
- for cat in $$catalogs; do
- lang=`echo $$cat | sed 's/.mo//'`;
- mv $$lang.po $$lang.old.po;
- echo "$$lang:";
- if $(MSGMERGE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then
- rm -f $$lang.old.po;
- else
- echo "$(MSGMERGE) for $$cat failed!";
- rm -f $$lang.po;
- mv $$lang.old.po $$lang.po;
- fi;
- done
- clean:
- rm -f *mo $(NLSPACKAGE).pot ja_JP.sjis.po ujis2sjis *.bak
- distclean: clean
- rm -f .depend Makefile
- depend:
- install: $(CATALOGS)
- for n in $(CATALOGS); do
- l=`basename $$n .mo`;
- $(INSTALL) -m 755 -d $(R)$(INSTALLNLSDIR)/$$l;
- $(INSTALL) -m 755 -d $(R)$(INSTALLNLSDIR)/$$l/LC_MESSAGES;
- $(INSTALL) -m 644 $$n $(R)$(INSTALLNLSDIR)/$$l/LC_MESSAGES/minicom.mo;
- done
- %.mo: %.po
- msgfmt -o $@ $<
- # Automatically make ja_JP.sjis.po from ja_JP.ujis.po
- # ujis2sjis is a converting program.
- ja_JP.sjis.po : ja_JP.ujis.po ujis2sjis
- ./ujis2sjis <ja_JP.ujis.po >ja_JP.sjis.po
- ujis2sjis : ujis2sjis.c
- cc $< -o $@