Mercurial > vim
annotate runtime/doc/Makefile @ 35122:739aaccbca74 default tip
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out
Commit: https://github.com/vim/vim/commit/8d8cb45756cb7e6fda17013b8347be3a11b29610
Author: D. Ben Knoble <ben.knoble+github@gmail.com>
Date: Mon May 6 19:52:53 2024 +0200
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then
:{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into
less when bash's "help" fails. This was introduced by 2f25e40b1
(runtime: configure keywordpg for some file types (#5566), 2023-08-23)
and may be present in other files touched by that commit.
Make the "man" invocation sensible by unsetting MANPAGER in the
environment.
Note that changing MANPAGER for `:terminal` is not needed; Vim within
Vim is perfectly fine.
closes: #14679
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 06 May 2024 20:00:09 +0200 |
parents | 879a61a9aa07 |
children |
rev | line source |
---|---|
7 | 1 # |
2 # Makefile for the Vim documentation on Unix | |
3 # | |
4 # If you get "don't know how to make scratch", first run make in the source | |
5 # directory. Or remove the include below. | |
6 | |
7 AWK = awk | |
8 | |
9 # Set to $(VIMTARGET) when executed from src/Makefile. | |
10 VIMEXE = vim | |
11 | |
12 # include the config.mk from the source directory. It's only needed to set | |
13 # AWK, used for "make html". Comment this out if the include gives problems. | |
14 include ../../src/auto/config.mk | |
15 | |
33712
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
16 # Common components |
33757
b882a17c8e2b
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Christian Brabandt <cb@256bit.org>
parents:
33712
diff
changeset
|
17 include Make_all.mak |
216 | 18 |
7 | 19 .SUFFIXES: |
20 .SUFFIXES: .c .o .txt .html | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
21 .PHONY: all vimtags noerrors perlhtml clean test_urls |
7 | 22 |
1698 | 23 all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) |
7 | 24 |
25 # Use Vim to generate the tags file. Can only be used when Vim has been | |
26 # compiled and installed. Supports multiple languages. | |
27 vimtags: $(DOCS) | |
19161
27ff44268da5
patch 8.2.0140: CI does not test building doc tags
Bram Moolenaar <Bram@vim.org>
parents:
18518
diff
changeset
|
28 @$(VIMEXE) --clean -esX -V1 -u doctags.vim |
7 | 29 |
30 # Use "doctags" to generate the tags file. Only works for English! | |
31 tags: doctags $(DOCS) | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
32 ./doctags $(DOCS) | LANG=C LC_ALL=C sort >$@ |
7 | 33 uniq -d -2 tags |
34 | |
35 doctags: doctags.c | |
36 $(CC) doctags.c -o doctags | |
37 | |
38 vim.man: vim.1 | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
39 nroff -man $< | sed -e s/.//g > $@ |
7 | 40 |
1698 | 41 evim.man: evim.1 |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
42 nroff -man $< | sed -e s/.//g > $@ |
1698 | 43 |
7 | 44 vimdiff.man: vimdiff.1 |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
45 nroff -man $< | sed -e s/.//g > $@ |
7 | 46 |
47 vimtutor.man: vimtutor.1 | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
48 nroff -man $< | sed -e s/.//g > $@ |
7 | 49 |
50 xxd.man: xxd.1 | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
51 nroff -man $< | sed -e s/.//g > $@ |
7 | 52 |
34670
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
53 uganda.nsis.txt : uganda.??? |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
54 for dpn in $?; do \ |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
55 trg=$@; \ |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
56 sed -e 's/[ ]*\*.*\*//g' -e 's/vim:tw=[[:digit:]][[:digit:]]:.*//' \ |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
57 $${dpn} | uniq > $${trg%txt}$${dpn##*.}; \ |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
58 done |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
59 # This files needs to be in dos fileformat for NSIS. |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
60 $(VIMEXE) -e -X -u NONE --cmd "set notitle noicon nocp noml viminfo=" \ |
879a61a9aa07
NSIS: Possibility to include translated license and README.txt files (#14311)
Christian Brabandt <cb@256bit.org>
parents:
34181
diff
changeset
|
61 -c "argdo write ++ff=dos" -c "qa" uganda.nsis.??? |
7 | 62 |
63 # Awk version of .txt to .html conversion. | |
2369
435b5c6a5191
Fix dependencies in help Makefile. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
64 html: noerrors tags $(HTMLS) |
7 | 65 @if test -f errors.log; then more errors.log; fi |
66 | |
67 noerrors: | |
68 -rm -f errors.log | |
69 | |
2369
435b5c6a5191
Fix dependencies in help Makefile. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
70 $(HTMLS): tags.ref |
435b5c6a5191
Fix dependencies in help Makefile. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
71 |
7 | 72 .txt.html: |
73 $(AWK) -f makehtml.awk $< >$@ | |
74 | |
788 | 75 # index.html is the starting point for HTML, but for the help files it is |
76 # help.txt. Therefore use vimindex.html for index.txt. | |
77 index.html: help.txt | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
78 $(AWK) -f makehtml.awk $< >$@ |
788 | 79 |
80 vimindex.html: index.txt | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
81 $(AWK) -f makehtml.awk $< >$@ |
788 | 82 |
7 | 83 tags.ref tags.html: tags |
84 $(AWK) -f maketags.awk tags >tags.html | |
85 | |
86 # Perl version of .txt to .html conversion. | |
87 # There can't be two rules to produce a .html from a .txt file. | |
88 # Just run over all .txt files each time one changes. It's fast anyway. | |
89 perlhtml: tags $(DOCS) | |
90 ./vim2html.pl tags $(DOCS) | |
91 | |
12968 | 92 # Check URLs in the help with "curl". |
93 test_urls: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
94 $(VIMEXE) --clean -S test_urls.vim |
12968 | 95 |
7 | 96 clean: |
21242
c2fbac867d9c
patch 8.2.1172: error messages when doing "make clean" in doc or tee
Bram Moolenaar <Bram@vim.org>
parents:
20856
diff
changeset
|
97 -rm -f doctags *.html tags.ref |
7 | 98 |
99 # These files are in the extra archive, skip if not present | |
100 | |
101 arabic.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
102 touch $@ |
7 | 103 |
104 farsi.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
105 touch $@ |
7 | 106 |
107 hebrew.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
108 touch $@ |
7 | 109 |
110 russian.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
111 touch $@ |
7 | 112 |
113 gui_w32.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
114 touch $@ |
7 | 115 |
116 if_ole.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
117 touch $@ |
7 | 118 |
119 os_390.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
120 touch $@ |
7 | 121 |
122 os_amiga.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
123 touch $@ |
7 | 124 |
125 os_beos.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
126 touch $@ |
7 | 127 |
128 os_dos.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
129 touch $@ |
7 | 130 |
19526
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
131 os_haiku.txt: |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
132 touch $@ |
19526
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
133 |
7 | 134 os_mac.txt: |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
135 touch $@ |
7 | 136 |
137 os_mint.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
138 touch $@ |
7 | 139 |
140 os_msdos.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
141 touch $@ |
7 | 142 |
143 os_os2.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
144 touch $@ |
7 | 145 |
146 os_qnx.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
147 touch $@ |
7 | 148 |
149 os_risc.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
150 touch $@ |
7 | 151 |
152 os_win32.txt: | |
34181
94a9edb82750
runtime(doc): improve doc makefiles, add clean rule (#13855)
Christian Brabandt <cb@256bit.org>
parents:
33757
diff
changeset
|
153 touch $@ |
216 | 154 |
701 | 155 # Note that $< works with GNU make while $> works for BSD make. |
810 | 156 # Is there a solution that works for both?? |
33757
b882a17c8e2b
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Christian Brabandt <cb@256bit.org>
parents:
33712
diff
changeset
|
157 vim-da.UTF-8.1: vim-da.1 |
33712
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
158 iconv -f latin1 -t utf-8 $< >$@ |
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
159 |
33757
b882a17c8e2b
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Christian Brabandt <cb@256bit.org>
parents:
33712
diff
changeset
|
160 vimdiff-da.UTF-8.1: vimdiff-da.1 |
33712
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
161 iconv -f latin1 -t utf-8 $< >$@ |
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
162 |
33757
b882a17c8e2b
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Christian Brabandt <cb@256bit.org>
parents:
33712
diff
changeset
|
163 vimtutor-da.UTF-8.1: vimtutor-da.1 |
33712
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
164 iconv -f latin1 -t utf-8 $< >$@ |
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
165 |
33757
b882a17c8e2b
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Christian Brabandt <cb@256bit.org>
parents:
33712
diff
changeset
|
166 vim-de.UTF-8.1: vim-de.1 |
33712
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
167 iconv -f latin1 -t utf-8 $< >$@ |
e09acb1daea7
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Christian Brabandt <cb@256bit.org>
parents:
31335
diff
changeset
|
168 |
236 | 169 vim-fr.UTF-8.1: vim-fr.1 |
170 iconv -f latin1 -t utf-8 $< >$@ | |
171 | |
172 evim-fr.UTF-8.1: evim-fr.1 | |
173 iconv -f latin1 -t utf-8 $< >$@ | |
174 | |
175 vimdiff-fr.UTF-8.1: vimdiff-fr.1 | |
176 iconv -f latin1 -t utf-8 $< >$@ | |
177 | |
178 vimtutor-fr.UTF-8.1: vimtutor-fr.1 | |
179 iconv -f latin1 -t utf-8 $< >$@ | |
180 | |
181 xxd-fr.UTF-8.1: xxd-fr.1 | |
182 iconv -f latin1 -t utf-8 $< >$@ | |
183 | |
216 | 184 vim-it.UTF-8.1: vim-it.1 |
236 | 185 iconv -f latin1 -t utf-8 $< >$@ |
216 | 186 |
187 evim-it.UTF-8.1: evim-it.1 | |
236 | 188 iconv -f latin1 -t utf-8 $< >$@ |
216 | 189 |
190 vimdiff-it.UTF-8.1: vimdiff-it.1 | |
236 | 191 iconv -f latin1 -t utf-8 $< >$@ |
216 | 192 |
193 vimtutor-it.UTF-8.1: vimtutor-it.1 | |
236 | 194 iconv -f latin1 -t utf-8 $< >$@ |
216 | 195 |
196 xxd-it.UTF-8.1: xxd-it.1 | |
236 | 197 iconv -f latin1 -t utf-8 $< >$@ |
216 | 198 |
1698 | 199 vim-pl.UTF-8.1: vim-pl.1 |
200 iconv -f latin2 -t utf-8 $< >$@ | |
201 | |
202 evim-pl.UTF-8.1: evim-pl.1 | |
203 iconv -f latin2 -t utf-8 $< >$@ | |
204 | |
205 vimdiff-pl.UTF-8.1: vimdiff-pl.1 | |
206 iconv -f latin2 -t utf-8 $< >$@ | |
207 | |
208 vimtutor-pl.UTF-8.1: vimtutor-pl.1 | |
209 iconv -f latin2 -t utf-8 $< >$@ | |
210 | |
211 xxd-pl.UTF-8.1: xxd-pl.1 | |
212 iconv -f latin2 -t utf-8 $< >$@ | |
213 | |
216 | 214 vim-ru.UTF-8.1: vim-ru.1 |
236 | 215 iconv -f KOI8-R -t utf-8 $< >$@ |
216 | 216 |
217 evim-ru.UTF-8.1: evim-ru.1 | |
236 | 218 iconv -f KOI8-R -t utf-8 $< >$@ |
216 | 219 |
220 vimdiff-ru.UTF-8.1: vimdiff-ru.1 | |
236 | 221 iconv -f KOI8-R -t utf-8 $< >$@ |
216 | 222 |
223 vimtutor-ru.UTF-8.1: vimtutor-ru.1 | |
236 | 224 iconv -f KOI8-R -t utf-8 $< >$@ |
216 | 225 |
226 xxd-ru.UTF-8.1: xxd-ru.1 | |
236 | 227 iconv -f KOI8-R -t utf-8 $< >$@ |
20611
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
228 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
229 vim-tr.UTF-8.1: vim-tr.1 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
230 iconv -f latin5 -t utf-8 $< >$@ |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
231 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
232 evim-tr.UTF-8.1: evim-tr.1 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
233 iconv -f latin5 -t utf-8 $< >$@ |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
234 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
235 vimdiff-tr.UTF-8.1: vimdiff-tr.1 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
236 iconv -f latin5 -t utf-8 $< >$@ |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
237 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
238 vimtutor-tr.UTF-8.1: vimtutor-tr.1 |
ac057cd4e5cb
patch 8.2.0859: no Turkish translation of the manual
Bram Moolenaar <Bram@vim.org>
parents:
19526
diff
changeset
|
239 iconv -f latin5 -t utf-8 $< >$@ |