PageRenderTime 54ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/vim_runtime/sources_non_forked/vim-markdown/Makefile

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