Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Restorer | b23c1fc | 2023-11-04 08:57:09 +0000 | [diff] [blame] | 16 | # Common components |
Restorer | 424da59 | 2023-11-11 18:26:00 +0000 | [diff] [blame] | 17 | include Make_all.mak |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 18 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 19 | .SUFFIXES: |
| 20 | .SUFFIXES: .c .o .txt .html |
| 21 | |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 22 | all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 23 | |
| 24 | # Use Vim to generate the tags file. Can only be used when Vim has been |
| 25 | # compiled and installed. Supports multiple languages. |
| 26 | vimtags: $(DOCS) |
Bram Moolenaar | 2387773 | 2020-01-21 22:13:42 +0100 | [diff] [blame] | 27 | @$(VIMEXE) --clean -esX -V1 -u doctags.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 28 | |
| 29 | # Use "doctags" to generate the tags file. Only works for English! |
| 30 | tags: doctags $(DOCS) |
| 31 | ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags |
| 32 | uniq -d -2 tags |
| 33 | |
| 34 | doctags: doctags.c |
| 35 | $(CC) doctags.c -o doctags |
| 36 | |
| 37 | vim.man: vim.1 |
| 38 | nroff -man vim.1 | sed -e s/.//g > vim.man |
| 39 | |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 40 | evim.man: evim.1 |
| 41 | nroff -man evim.1 | sed -e s/.//g > evim.man |
| 42 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 43 | vimdiff.man: vimdiff.1 |
| 44 | nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man |
| 45 | |
| 46 | vimtutor.man: vimtutor.1 |
| 47 | nroff -man vimtutor.1 | sed -e s/.//g > vimtutor.man |
| 48 | |
| 49 | xxd.man: xxd.1 |
| 50 | nroff -man xxd.1 | sed -e s/.//g > xxd.man |
| 51 | |
| 52 | uganda.nsis.txt: uganda.txt |
Bram Moolenaar | 7cb769a | 2017-11-16 17:36:02 +0100 | [diff] [blame] | 53 | sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 54 | uganda.txt | uniq >uganda.nsis.txt |
| 55 | |
| 56 | # Awk version of .txt to .html conversion. |
Bram Moolenaar | cdda8fe | 2010-07-21 20:40:27 +0200 | [diff] [blame] | 57 | html: noerrors tags $(HTMLS) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 58 | @if test -f errors.log; then more errors.log; fi |
| 59 | |
| 60 | noerrors: |
| 61 | -rm -f errors.log |
| 62 | |
Bram Moolenaar | cdda8fe | 2010-07-21 20:40:27 +0200 | [diff] [blame] | 63 | $(HTMLS): tags.ref |
| 64 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 65 | .txt.html: |
| 66 | $(AWK) -f makehtml.awk $< >$@ |
| 67 | |
Bram Moolenaar | 371d540 | 2006-03-20 21:47:49 +0000 | [diff] [blame] | 68 | # index.html is the starting point for HTML, but for the help files it is |
| 69 | # help.txt. Therefore use vimindex.html for index.txt. |
| 70 | index.html: help.txt |
| 71 | $(AWK) -f makehtml.awk help.txt >index.html |
| 72 | |
| 73 | vimindex.html: index.txt |
| 74 | $(AWK) -f makehtml.awk index.txt >vimindex.html |
| 75 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 76 | tags.ref tags.html: tags |
| 77 | $(AWK) -f maketags.awk tags >tags.html |
| 78 | |
| 79 | # Perl version of .txt to .html conversion. |
| 80 | # There can't be two rules to produce a .html from a .txt file. |
| 81 | # Just run over all .txt files each time one changes. It's fast anyway. |
| 82 | perlhtml: tags $(DOCS) |
| 83 | ./vim2html.pl tags $(DOCS) |
| 84 | |
Bram Moolenaar | 2f05849 | 2017-11-30 20:27:52 +0100 | [diff] [blame] | 85 | # Check URLs in the help with "curl". |
| 86 | test_urls: |
| 87 | vim -S test_urls.vim |
| 88 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 89 | clean: |
Bram Moolenaar | 08fc484 | 2020-07-10 20:40:23 +0200 | [diff] [blame] | 90 | -rm -f doctags *.html tags.ref |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 91 | |
| 92 | # These files are in the extra archive, skip if not present |
| 93 | |
| 94 | arabic.txt: |
| 95 | touch arabic.txt |
| 96 | |
| 97 | farsi.txt: |
| 98 | touch farsi.txt |
| 99 | |
| 100 | hebrew.txt: |
| 101 | touch hebrew.txt |
| 102 | |
| 103 | russian.txt: |
| 104 | touch russian.txt |
| 105 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 106 | gui_w32.txt: |
| 107 | touch gui_w32.txt |
| 108 | |
| 109 | if_ole.txt: |
| 110 | touch if_ole.txt |
| 111 | |
| 112 | os_390.txt: |
| 113 | touch os_390.txt |
| 114 | |
| 115 | os_amiga.txt: |
| 116 | touch os_amiga.txt |
| 117 | |
| 118 | os_beos.txt: |
| 119 | touch os_beos.txt |
| 120 | |
| 121 | os_dos.txt: |
| 122 | touch os_dos.txt |
| 123 | |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 124 | os_haiku.txt: |
| 125 | touch os_haiku.txt |
| 126 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 127 | os_mac.txt: |
| 128 | touch os_mac.txt |
| 129 | |
| 130 | os_mint.txt: |
| 131 | touch os_mint.txt |
| 132 | |
| 133 | os_msdos.txt: |
| 134 | touch os_msdos.txt |
| 135 | |
| 136 | os_os2.txt: |
| 137 | touch os_os2.txt |
| 138 | |
| 139 | os_qnx.txt: |
| 140 | touch os_qnx.txt |
| 141 | |
| 142 | os_risc.txt: |
| 143 | touch os_risc.txt |
| 144 | |
| 145 | os_win32.txt: |
| 146 | touch os_win32.txt |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 147 | |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 148 | # Note that $< works with GNU make while $> works for BSD make. |
Bram Moolenaar | 3991dab | 2006-03-27 17:01:56 +0000 | [diff] [blame] | 149 | # Is there a solution that works for both?? |
Restorer | 424da59 | 2023-11-11 18:26:00 +0000 | [diff] [blame] | 150 | vim-da.UTF-8.1: vim-da.1 |
Restorer | b23c1fc | 2023-11-04 08:57:09 +0000 | [diff] [blame] | 151 | iconv -f latin1 -t utf-8 $< >$@ |
| 152 | |
Restorer | 424da59 | 2023-11-11 18:26:00 +0000 | [diff] [blame] | 153 | vimdiff-da.UTF-8.1: vimdiff-da.1 |
Restorer | b23c1fc | 2023-11-04 08:57:09 +0000 | [diff] [blame] | 154 | iconv -f latin1 -t utf-8 $< >$@ |
| 155 | |
Restorer | 424da59 | 2023-11-11 18:26:00 +0000 | [diff] [blame] | 156 | vimtutor-da.UTF-8.1: vimtutor-da.1 |
Restorer | b23c1fc | 2023-11-04 08:57:09 +0000 | [diff] [blame] | 157 | iconv -f latin1 -t utf-8 $< >$@ |
| 158 | |
Restorer | 424da59 | 2023-11-11 18:26:00 +0000 | [diff] [blame] | 159 | vim-de.UTF-8.1: vim-de.1 |
Restorer | b23c1fc | 2023-11-04 08:57:09 +0000 | [diff] [blame] | 160 | iconv -f latin1 -t utf-8 $< >$@ |
| 161 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 162 | vim-fr.UTF-8.1: vim-fr.1 |
| 163 | iconv -f latin1 -t utf-8 $< >$@ |
| 164 | |
| 165 | evim-fr.UTF-8.1: evim-fr.1 |
| 166 | iconv -f latin1 -t utf-8 $< >$@ |
| 167 | |
| 168 | vimdiff-fr.UTF-8.1: vimdiff-fr.1 |
| 169 | iconv -f latin1 -t utf-8 $< >$@ |
| 170 | |
| 171 | vimtutor-fr.UTF-8.1: vimtutor-fr.1 |
| 172 | iconv -f latin1 -t utf-8 $< >$@ |
| 173 | |
| 174 | xxd-fr.UTF-8.1: xxd-fr.1 |
| 175 | iconv -f latin1 -t utf-8 $< >$@ |
| 176 | |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 177 | vim-it.UTF-8.1: vim-it.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 178 | iconv -f latin1 -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 179 | |
| 180 | evim-it.UTF-8.1: evim-it.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 181 | iconv -f latin1 -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 182 | |
| 183 | vimdiff-it.UTF-8.1: vimdiff-it.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 184 | iconv -f latin1 -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 185 | |
| 186 | vimtutor-it.UTF-8.1: vimtutor-it.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 187 | iconv -f latin1 -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 188 | |
| 189 | xxd-it.UTF-8.1: xxd-it.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 190 | iconv -f latin1 -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 191 | |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 192 | vim-pl.UTF-8.1: vim-pl.1 |
| 193 | iconv -f latin2 -t utf-8 $< >$@ |
| 194 | |
| 195 | evim-pl.UTF-8.1: evim-pl.1 |
| 196 | iconv -f latin2 -t utf-8 $< >$@ |
| 197 | |
| 198 | vimdiff-pl.UTF-8.1: vimdiff-pl.1 |
| 199 | iconv -f latin2 -t utf-8 $< >$@ |
| 200 | |
| 201 | vimtutor-pl.UTF-8.1: vimtutor-pl.1 |
| 202 | iconv -f latin2 -t utf-8 $< >$@ |
| 203 | |
| 204 | xxd-pl.UTF-8.1: xxd-pl.1 |
| 205 | iconv -f latin2 -t utf-8 $< >$@ |
| 206 | |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 207 | vim-ru.UTF-8.1: vim-ru.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 208 | iconv -f KOI8-R -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 209 | |
| 210 | evim-ru.UTF-8.1: evim-ru.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 211 | iconv -f KOI8-R -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 212 | |
| 213 | vimdiff-ru.UTF-8.1: vimdiff-ru.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 214 | iconv -f KOI8-R -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 215 | |
| 216 | vimtutor-ru.UTF-8.1: vimtutor-ru.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 217 | iconv -f KOI8-R -t utf-8 $< >$@ |
Bram Moolenaar | 4317d9b | 2005-03-18 20:25:31 +0000 | [diff] [blame] | 218 | |
| 219 | xxd-ru.UTF-8.1: xxd-ru.1 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 220 | iconv -f KOI8-R -t utf-8 $< >$@ |
Bram Moolenaar | f09715b | 2020-05-31 14:25:22 +0200 | [diff] [blame] | 221 | |
| 222 | vim-tr.UTF-8.1: vim-tr.1 |
| 223 | iconv -f latin5 -t utf-8 $< >$@ |
| 224 | |
| 225 | evim-tr.UTF-8.1: evim-tr.1 |
| 226 | iconv -f latin5 -t utf-8 $< >$@ |
| 227 | |
| 228 | vimdiff-tr.UTF-8.1: vimdiff-tr.1 |
| 229 | iconv -f latin5 -t utf-8 $< >$@ |
| 230 | |
| 231 | vimtutor-tr.UTF-8.1: vimtutor-tr.1 |
| 232 | iconv -f latin5 -t utf-8 $< >$@ |