Skip to content

Commit 553822a

Browse files
committed
Update Makefile
* Add comments. * Add .PHONY target. * Add `import-en-files` and `update-src-dir` targets.
1 parent 1dc3df1 commit 553822a

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

Makefile

+36
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,51 @@ ARCHIVE_EXT = xz
33
ARCHIVE_DIR = $(ARCHIVE)
44
ARCHIVE_FILE = $(ARCHIVE).tar.$(ARCHIVE_EXT)
55

6+
VIM_SRC_DIR =
7+
68
INSTALL_DIR = $(ARCHIVE)-runtime
79

10+
.PHONY: import-en-files update-src-dir \
11+
archive archive-dir release release-today test install clean distclean \
12+
force-update-all force-update-po force-update-lang force-update-tutor
13+
14+
15+
# Import English files from the specified Vim source directory.
16+
import-en-files:
17+
@if test ! -d "$(VIM_SRC_DIR)"; then echo VIM_SRC_DIR not specified; exit 1; fi
18+
$(MAKE) -C "$(VIM_SRC_DIR)"/src/po/ vim.pot
19+
cp "$(VIM_SRC_DIR)"/src/po/vim.pot src/po/
20+
cp "$(VIM_SRC_DIR)"/runtime/doc/evim.1 \
21+
"$(VIM_SRC_DIR)"/runtime/doc/vim.1 \
22+
"$(VIM_SRC_DIR)"/runtime/doc/vimdiff.1 \
23+
"$(VIM_SRC_DIR)"/runtime/doc/vimtutor.1 \
24+
"$(VIM_SRC_DIR)"/runtime/doc/xxd.1 \
25+
runtime/doc/
26+
cp "$(VIM_SRC_DIR)"/runtime/tutor/tutor runtime/tutor/
27+
cp "$(VIM_SRC_DIR)"/nsis/lang/english.nsi nsis/lang/
28+
29+
# Update Vim source directory.
30+
update-src-dir:
31+
@if test ! -d "$(VIM_SRC_DIR)"; then echo VIM_SRC_DIR not specified; exit 1; fi
32+
@rm -rf $(ARCHIVE_DIR)
33+
$(MAKE) test
34+
$(MAKE) $(ARCHIVE_DIR)
35+
cp -rf $(ARCHIVE_DIR)/* "$(VIM_SRC_DIR)"
36+
rm -rf $(ARCHIVE_DIR)
37+
38+
839
archive: $(ARCHIVE_FILE)
940

1041
archive-dir: $(ARCHIVE_DIR)
1142

43+
# Create release package with the specified archive name.
1244
release: force-update-all
1345
@rm -rf $(ARCHIVE_DIR) $(ARCHIVE_FILE)
1446
$(MAKE) test
1547
$(MAKE) $(ARCHIVE_FILE)
1648
rm -rf $(ARCHIVE_DIR)
1749

50+
# Create release package based on today's date.
1851
release-today:
1952
$(MAKE) release ARCHIVE=vim-lang-ja-`date +%Y%m%d`
2053

@@ -23,6 +56,7 @@ test:
2356
$(MAKE) -C runtime/lang test
2457
$(MAKE) -C runtime/tutor test
2558

59+
# Install the message files into the specified (runtime) directory.
2660
install: test
2761
mkdir -p $(INSTALL_DIR)/lang/ja/LC_MESSAGES
2862
mkdir -p $(INSTALL_DIR)/lang/ja.euc-jp/LC_MESSAGES
@@ -62,10 +96,12 @@ $(ARCHIVE_DIR):
6296
mkdir -p $@/runtime/lang
6397
mkdir -p $@/runtime/doc
6498
mkdir -p $@/runtime/tutor
99+
mkdir -p $@/nsis/lang
65100
cp src/po/*.po $@/src/po
66101
cp runtime/lang/menu_ja*.vim $@/runtime/lang
67102
cp runtime/doc/*.UTF-8.1 $@/runtime/doc
68103
cp runtime/tutor/tutor.ja.* $@/runtime/tutor
104+
cp nsis/lang/japanese.nsi $@/nsis/lang
69105

70106
$(ARCHIVE).tar.gz: $(ARCHIVE_DIR)
71107
tar -czf $@ $<

runtime/lang/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MASTER_MENU = menu_ja_jp.utf-8.vim
22

3-
test:
3+
test: update
44

55
update: menu_ja_jp.euc-jp.vim menu_japanese_japan.932.vim
66

0 commit comments

Comments
 (0)