Mercurial > vim
comparison runtime/doc/Makefile @ 18518:59c56c97049d v8.1.2253
patch 8.1.2253: using "which" to check for an executable is not reliable
Commit: https://github.com/vim/vim/commit/ad4de52510d5b4a949c0c9e25b5d5333744820b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 4 21:24:48 2019 +0100
patch 8.1.2253: using "which" to check for an executable is not reliable
Problem: Using "which" to check for an executable is not reliable.
Solution: Use "command -v" instead. Also exit with error code when
generating tags has an error. (closes #5174)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Nov 2019 21:30:03 +0100 |
parents | b832fc67f84d |
children | 27ff44268da5 |
comparison
equal
deleted
inserted
replaced
18517:7ca13352c0dd | 18518:59c56c97049d |
---|---|
321 all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) | 321 all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) |
322 | 322 |
323 # Use Vim to generate the tags file. Can only be used when Vim has been | 323 # Use Vim to generate the tags file. Can only be used when Vim has been |
324 # compiled and installed. Supports multiple languages. | 324 # compiled and installed. Supports multiple languages. |
325 vimtags: $(DOCS) | 325 vimtags: $(DOCS) |
326 @if which $(VIMEXE) >/dev/null; then \ | 326 @if command -v $(VIMEXE); then \ |
327 $(VIMEXE) --clean -eX -u doctags.vim >/dev/null; \ | 327 $(VIMEXE) --clean -eX -u doctags.vim >/dev/null && \ |
328 echo "help tags updated"; \ | 328 echo "help tags updated"; \ |
329 else echo "vim executable $(VIMEXE) not found; help tags not updated"; fi | 329 else echo "vim executable $(VIMEXE) not found; help tags not updated"; fi |
330 | 330 |
331 # Use "doctags" to generate the tags file. Only works for English! | 331 # Use "doctags" to generate the tags file. Only works for English! |
332 tags: doctags $(DOCS) | 332 tags: doctags $(DOCS) |
333 ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags | 333 ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags |