Ctags: rst2man: ์˜ค๋ฅ˜: ๊ทธ๋Ÿฌํ•œ ์˜ต์…˜์ด ์—†์Šต๋‹ˆ๋‹ค: --syntax-highlight

์— ๋งŒ๋“  2019๋…„ 12์›” 15์ผ  ยท  15์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: universal-ctags/ctags

debian8 ์„ค์น˜ ์‹คํŒจ
without-doc ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ์‚ฌ๋ผ์กŒ์Šต๋‹ˆ๋‹ค.

Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at f7513be Merge pull request #2373 from pragmaware/fix-bug-2364-attempt-2
==> ./autogen.sh
==> ./configure --prefix=home/ouyangsong/.linuxbrew/Cellar/universal-ctags/HEAD-f7513be
==> make
Last 15 lines from /data02/home/ouyangsong/.cache/Homebrew/Logs/universal-ctags/03.make:
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5771: recipe for target 'man/tags.5' failed
make[1]: *** [man/tags.5] Error 2
Usage
=====
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5769: recipe for target 'man/ctags.1' failed
make[1]: *** [man/ctags.1] Error 2
make[1]: Leaving directory '/tmp/universal-ctags-20191215-3061613-15gdbok'
Makefile:1266: recipe for target 'all' failed
make: *** [all] Error 2
BUILDSYS|git operation|workflow|test harness

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” linuxbrew๋ฅผ ๋ชจ๋ฆ…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ํ–‰๋™์€ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋‚˜๋Š” ๊ทธ๋Ÿฌํ•œ ๋„๊ตฌ์˜ ๊ตฌ์ถ• ํ”„๋กœ์„ธ์Šค๊ฐ€ ์‚ฌ์šฉ์ž๊ฐ€ ์‚ฌ์šฉ์ž ์ •์˜ํ•œ ํ™˜๊ฒฝ์— ์˜์กดํ•ด์„œ๋Š” ์•ˆ ๋œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

์–ด์จŒ๋“  #2375์—์„œ ์ด ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. #2376 ๋ณ‘ํ•ฉ ํ›„ ๋ณ‘ํ•ฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  15 ๋Œ“๊ธ€

rst2man์ด ๋„ˆ๋ฌด ์˜ค๋ž˜๋˜์—ˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
https://sourceforge.net/p/docutils/patches/141/ ์ฐธ์กฐ

๋‚˜๋Š” ์ด๊ฒƒ์ด ctags์˜ ๋นŒ๋“œ ์‹œ์Šคํ…œ์˜ ๋ฌธ์ œ๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

๋งˆ์ง€๋ง‰ docutils์™€ ๋ณ„์นญ rst2man์„ ์ตœ์‹  rst2man์— ์„ค์น˜ํ–ˆ๋Š”๋ฐ ์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

$ pip install --user --upgrade docutils
$ alias rst2man=//home/ouyangsong/.local/bin/rst2man.py
$ rst2man --version
rst2man.py (Docutils 0.15.2 [release], Python 2.7.9, on linux2)

alias ๋Š” ์…ธ์—์„œ๋งŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ์–ด๋–ป์Šต๋‹ˆ๊นŒ?

๊ธฐ๋ณธ rst2man์€ /usr/bin ์— ์žˆ์ง€๋งŒ ๋ฃจํŠธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.
$PATH๋ฅผ ์ถ”๊ฐ€ํ•˜๋ ค๊ณ  ์‹œ๋„ํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. @k-takata ๋‹น์‹ ์€ rst2man์ด ์‹คํ–‰ ์ค‘์ด๋ผ๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•˜๋ฏ€๋กœ ํ•˜์œ„ ํ”„๋กœ์„ธ์Šค์—์„œ rst2man์ด ๋„ˆ๋ฌด ์˜ค๋ž˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. ๋ฌธ์ œ๋ฅผ ์ž˜๋ชป ์ดํ•ดํ–ˆ์Šต๋‹ˆ๋‹ค.
rst2man --version ๋ฐ rst2man --help | grep highlight ์˜ ์ถœ๋ ฅ์„ ์•Œ๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ์˜ˆ์ž…๋‹ˆ๋‹ค.

[yamato@slave]~/var/ctags-github/man% rst2man --version
rst2man --version
rst2man (Docutils 0.14, Python 2.7.15, on linux2)
[yamato@slave]~/var/ctags-github/man% rst2man --help | grep highlight
rst2man --help | grep highlight
--syntax-highlight=<format>

๊ท€ํ•˜์˜ rst2man์— --syntax-highlight๊ฐ€ ์—†๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
๋‚ด ์ถ”์ธก์ด ๋งž๋‹ค๋ฉด ๋‹ค์Œ ํŒจ์น˜๋กœ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

diff --git a/man/Makefile b/man/Makefile
index ec43caa2..42d911d4 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -25,7 +25,9 @@ RST2PDF  = rst2pdf

 # rst2man had a bug about code-block:: handling.
 # https://sourceforge.net/p/docutils/patches/141
-RST2MAN_FLAGS = --syntax-highlight=none
+RST2MAN_FLAGS = $(shell if $(RST2MAN) --help | grep -q -e --syntax-highlight; then \
+               echo --syntax-highlight=none; \
+           fi)
 RST2HTML_FLAGS =
 RST2PDF_FLAGS =

@masatake ๋„ค, ๋‹น์‹ ์˜ ์ถ”์ธก์ด ๋งž์Šต๋‹ˆ๋‹ค. /usr/bin ์˜ rst2man์—๋Š” ๊ตฌ๋ฌธ ๊ฐ•์กฐ ํ‘œ์‹œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

$ rst2man --help | grep -q -e --syntax-highlight
$ /usr/bin/rst2man --version
rst2man (Docutils 0.8.1 [release], Python 2.7.9, on linux2)

์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์—…๊ทธ๋ ˆ์ด๋“œํ•  ๋ฃจํŠธ๊ฐ€ ์—†์œผ๋ฏ€๋กœ linuxbrew install ctags์˜ ์ข…์†์„ฑ์„ ์‚ฌ์šฉํ•œ ๋‹ค์Œ https://github.com/universal-ctags/ctags/blob/master/docs/autotools.rst ๋ฅผ ๋”ฐ๋ผ $HOME/.local ์— ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค
๊ทธ๋Ÿฌ๋‚˜ linuxbrew๊ฐ€ $HOME/.local ์—์„œ rst2man์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ์‹ฌ๋ณผ๋ฆญ ๋งํฌ "$HOME/.local/bin/rst2man -> $HOME/.local/bin/์„ ์ƒ์„ฑํ•œ ํ›„ /usr/bin/rst2man ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ด์ƒํ•ฉ๋‹ˆ๋‹ค. rst2man.py"๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  $PATH๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ๋‚˜๋Š” linuxbrew๊ฐ€ ๋‚ด $PATH๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์…ธ ํ•˜์œ„ ํ”„๋กœ์„ธ์Šค๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” linuxbrew๋ฅผ ๋ชจ๋ฆ…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ํ–‰๋™์€ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋‚˜๋Š” ๊ทธ๋Ÿฌํ•œ ๋„๊ตฌ์˜ ๊ตฌ์ถ• ํ”„๋กœ์„ธ์Šค๊ฐ€ ์‚ฌ์šฉ์ž๊ฐ€ ์‚ฌ์šฉ์ž ์ •์˜ํ•œ ํ™˜๊ฒฝ์— ์˜์กดํ•ด์„œ๋Š” ์•ˆ ๋œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

์–ด์จŒ๋“  #2375์—์„œ ์ด ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. #2376 ๋ณ‘ํ•ฉ ํ›„ ๋ณ‘ํ•ฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

#2375๋ฅผ ๋ณ‘ํ•ฉํ–ˆ์Šต๋‹ˆ๋‹ค. @songouyang , ๋‹ค์‹œ ์‹œ๋„ํ•ด ์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?

@masatake ๋‹ค์‹œ ์‹œ๋„ํ–ˆ์ง€๋งŒ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค. man/makefile์—์„œ rst2man ์˜ต์…˜์„ ์ˆ˜์ •ํ–ˆ์ง€๋งŒ makefile์—์„œ ์ด ์ค„์„ ์žŠ์–ด๋ฒ„๋ ธ์„ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
https://github.com/universal-ctags/ctags/blob/ba26b8a744ab7af3842ba219d75c5dc845ba583e/Makefile.am#L232

==> make
Last 15 lines from /data02/home/ouyangsong/.cache/Homebrew/Logs/universal-ctags/03.make:
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5773: recipe for target 'man/ctags-incompatibilities.7' failed
make[1]: *** [man/ctags-incompatibilities.7] Error 2
Usage
=====
  rst2man [options] [<source> [<destination>]]

rst2man: error: no such option: --syntax-highlight
Makefile:5773: recipe for target 'man/ctags-optlib.7' failed
make[1]: *** [man/ctags-optlib.7] Error 2
make[1]: Leaving directory '/tmp/universal-ctags-20191217-3629840-z9svqb'
Makefile:1266: recipe for target 'all' failed
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/universal-ctags/homebrew-universal-ctags/issues
5768 .1.rst.1:
5769         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
5770 .5.rst.5:
5771         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
5772 .7.rst.7:
5773         $(rst2man_verbose)$(RST2MAN) $(RST2MAN_OPTIONS) $< $@
1264 RST2MAN_OPTIONS = --syntax-highlight=none
1265 all: $(BUILT_SOURCES) config.h
1266         $(MAKE) $(AM_MAKEFLAGS) all-am

๊ฐ์‚ฌ ํ•ด์š”!
ํ’€ ๋ฆฌํ€˜์ŠคํŠธ๋ฅผ ํ•˜๋‚˜ ๋” ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋‹ค์‹œ ์‹œ๋„ํ•ด ์ฃผ์‹œ๊ฒ ์–ด์š”?

@masatake ์ด์ œ ๊ดœ์ฐฎ์•„์š” ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค๐Ÿ‘

ํ…Œ์ŠคํŒ…(๋ฐ ์ค‘์š”ํ•œ ์ œ์•ˆ)์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰