Skip to content

Commit 402ba59

Browse files
committed
fix *.po check
* not work on Windows (enc=cp932 env) * friendly error message: print error lines when fail to check * new targets: check, checkclean
1 parent 35b0607 commit 402ba59

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/po/Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
MASTER_PO = ja.po
2+
23
MOFILES = ja.mo \
34
ja.euc-jp.mo \
45
ja.sjis.mo
6+
57
CHECKFILES = ja.ck \
68
ja.euc-jp.ck \
79
ja.sjis.ck
@@ -10,7 +12,7 @@ MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt
1012

1113
.SUFFIXES: .po .mo .ck
1214

13-
test: $(MOFILES) $(CHECKFILES)
15+
test: check $(MOFILES)
1416

1517
update: ja.sjis.po ja.euc-jp.po
1618

@@ -41,10 +43,10 @@ merge-force:
4143
touch vim.pot
4244
@$(MAKE) merge
4345

44-
clean:
46+
clean: checkclean
4547
rm -f sjiscorr sjiscorr.exe
4648
rm -f ja.sjis.po ja.euc-jp.po
47-
rm -f *.mo *.ck
49+
rm -f *.mo
4850

4951
#ja.po: vim.pot
5052
@@ -55,5 +57,11 @@ clean:
5557
$(MSGFMT) -v -o $@ $<
5658

5759
.po.ck:
58-
vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
60+
vim -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
61+
-c "if error == 0 | q | else | num 2 | cq | endif" $<
5962
touch $@
63+
64+
check: $(CHECKFILES)
65+
66+
checkclean:
67+
rm -f *.ck

0 commit comments

Comments
 (0)