]> git.madduck.net Git - etc/vim.git/blob - Makefile

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix strikethrough
[etc/vim.git] / Makefile
1 VIMDIR=$(DESTDIR)/usr/share/vim
2 ADDONS=${VIMDIR}/addons
3 REGISTRY=${VIMDIR}/registry
4
5 all:
6
7 install:
8         mkdir -pv ${ADDONS}/ftdetect
9         cp -v ftdetect/markdown.vim ${ADDONS}/ftdetect/markdown.vim
10         mkdir -pv ${ADDONS}/ftplugin
11         cp -v ftplugin/markdown.vim ${ADDONS}/ftplugin/markdown.vim
12         mkdir -pv ${ADDONS}/syntax
13         cp -v syntax/markdown.vim ${ADDONS}/syntax/markdown.vim
14         mkdir -pv ${ADDONS}/after/ftplugin
15         cp -v after/ftplugin/markdown.vim ${ADDONS}/after/ftplugin/markdown.vim
16         mkdir -pv ${ADDONS}/indent
17         cp -v indent/markdown.vim ${ADDONS}/indent/markdown.vim
18         mkdir -pv ${ADDONS}/doc
19         cp -v doc/vim-markdown.txt ${ADDONS}/doc/vim-markdown.txt
20         mkdir -pv ${REGISTRY}
21         cp -v registry/markdown.yaml ${REGISTRY}/markdown.yaml
22
23 test: build/tabular build/vim-toml build/vim-json build/vader.vim
24         test/run-tests.sh
25 .PHONY: test
26
27 update: build/tabular build/vim-toml build/vim-json build/vader.vim
28         cd build/tabular && git pull
29         cd build/vim-toml && git pull
30         cd build/vim-json && git pull
31         cd build/vader.vim && git pull
32 .PHONY: update
33
34 build/tabular: | build
35         git clone https://github.com/godlygeek/tabular build/tabular
36
37 build/vim-toml: | build
38         git clone https://github.com/cespare/vim-toml build/vim-toml
39
40 build/vim-json: | build
41         git clone https://github.com/elzr/vim-json build/vim-json
42
43 build/vader.vim: | build
44         git clone https://github.com/junegunn/vader.vim build/vader.vim
45
46 build:
47         mkdir build
48
49 doc: build/html2vimdoc build/vim-tools
50         sed -e '/^\[!\[Build Status\]/d' \
51             -e '/^1\. \[/d' README.md > doc/tmp.md # remove table of contents
52         build/html2vimdoc/bin/python build/vim-tools/html2vimdoc.py -f vim-markdown \
53                 doc/tmp.md | \
54                 sed -E -e "s/[[:space:]]*$$//" -e "# remove trailing spaces" \
55                     -e "/^.{79,}\|$$/ {" -e "# wrap table of contents over 79" \
56                     -e "h" -e "# save the matched line to the hold space" \
57                     -e "s/^(.*) (\|[^|]*\|)$$/\1/" -e "# make content title" \
58                     -e "p" -e "# print title" \
59                     -e "g" -e "# restore the matched line" \
60                     -e "s/^.* (\|[^|]*\|)$$/ \1/" -e "# make link" \
61                     -e ":c" -e "s/^(.{1,78})$$/ \1/" -e "tc" -e "# align right" \
62                     -e "}" \
63                     -e "/^- '[^']*':( |$$)/ {" \
64                     -e "h" -e "# save the matched line to the hold space" \
65                     -e "s/^- '([^']{3,})':.*/ \*\1\*/" -e "# make command reference" \
66                     -e "s/^- '([^']{1,2})':.*/ \*vim-markdown-\1\*/" -e "# short command" \
67                     -e ":a" -e "s/^(.{1,78})$$/ \1/" -e "ta" -e "# align right" \
68                     -e "G" -e "# append the matched line after the command reference" \
69                     -e "}" \
70                     -e "/^- 'g:vim_markdown_[[:alnum:]_]*'$$/ {" \
71                     -e "h" -e "# save the matched line to the hold space" \
72                     -e "s/^- '([^']*)'$$/ \*\1\*/" -e "# make global variable reference" \
73                     -e ":g" -e "s/^(.{1,78})$$/ \1/" -e "tg" -e "# align right" \
74                     -e "G" -e "# append the matched line after the global variable reference" \
75                     -e "}" > doc/vim-markdown.txt && rm -f doc/tmp.md
76
77 .PHONY: doc
78
79 # Prerequire Python and virtualenv.
80 # $ sudo pip install virtualenv
81 # Create the virtual environment.
82 # Install the dependencies.
83 build/html2vimdoc: | build
84         virtualenv build/html2vimdoc
85         build/html2vimdoc/bin/pip install beautifulsoup coloredlogs==4.0 markdown
86
87 build/vim-tools: | build
88         git clone https://github.com/xolox/vim-tools.git build/vim-tools