From e1cb9bcdd70e4797fab29b9189e847c9be425d74 Mon Sep 17 00:00:00 2001 From: Kenichi Ito Date: Wed, 7 Sep 2016 00:03:53 +0900 Subject: [PATCH 1/3] Run check.vim when testing --- src/po/Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/po/Makefile b/src/po/Makefile index 6f56715..87db55e 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -1,13 +1,16 @@ MASTER_PO = ja.po -TEST_TARGETS = ja.mo \ - ja.euc-jp.mo \ - ja.sjis.mo +MOFILES = ja.mo \ + ja.euc-jp.mo \ + ja.sjis.mo +CHECKFILES = ja.ck \ + ja.euc-jp.ck \ + ja.sjis.ck MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -.SUFFIXES: .po .mo +.SUFFIXES: .po .mo .ck -test: $(TEST_TARGETS) +test: $(MOFILES) $(CHECKFILES) update: ja.sjis.po ja.euc-jp.po @@ -41,7 +44,7 @@ merge-force: clean: rm -f sjiscorr sjiscorr.exe rm -f ja.sjis.po ja.euc-jp.po - rm -f *.mo + rm -f *.mo *.ck #ja.po: vim.pot # rm -f $@.old @@ -50,3 +53,7 @@ clean: .po.mo: $(MSGFMT) -v -o $@ $< + +.po.ck: + vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< + touch $@ From 35b0607e1b225cc6500d717ccb3e6f0518af51bd Mon Sep 17 00:00:00 2001 From: Kenichi Ito Date: Wed, 7 Sep 2016 00:46:05 +0900 Subject: [PATCH 2/3] Add *.ck to .gitignore --- src/po/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/po/.gitignore b/src/po/.gitignore index 4954d88..1652506 100644 --- a/src/po/.gitignore +++ b/src/po/.gitignore @@ -1,4 +1,5 @@ /*.mo +/*.ck /*.po.bak /*.po.new /*.po.old From 402ba59e0b8b8c698ced6f6292edddd76ab94968 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Wed, 7 Sep 2016 20:02:33 +0900 Subject: [PATCH 3/3] fix *.po check * not work on Windows (enc=cp932 env) * friendly error message: print error lines when fail to check * new targets: check, checkclean --- src/po/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/po/Makefile b/src/po/Makefile index 87db55e..cb0672f 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -1,7 +1,9 @@ MASTER_PO = ja.po + MOFILES = ja.mo \ ja.euc-jp.mo \ ja.sjis.mo + CHECKFILES = ja.ck \ ja.euc-jp.ck \ ja.sjis.ck @@ -10,7 +12,7 @@ MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt .SUFFIXES: .po .mo .ck -test: $(MOFILES) $(CHECKFILES) +test: check $(MOFILES) update: ja.sjis.po ja.euc-jp.po @@ -41,10 +43,10 @@ merge-force: touch vim.pot @$(MAKE) merge -clean: +clean: checkclean rm -f sjiscorr sjiscorr.exe rm -f ja.sjis.po ja.euc-jp.po - rm -f *.mo *.ck + rm -f *.mo #ja.po: vim.pot # rm -f $@.old @@ -55,5 +57,11 @@ clean: $(MSGFMT) -v -o $@ $< .po.ck: - vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< + vim -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \ + -c "if error == 0 | q | else | num 2 | cq | endif" $< touch $@ + +check: $(CHECKFILES) + +checkclean: + rm -f *.ck