vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

Makefile (5310B)


      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 VIMPROG = ../../src/vim
     10 
     11 # include the config.mk from the source directory.  It's only needed to set
     12 # AWK, used for "make html".  Comment this out if the include gives problems.
     13 include ../../src/auto/config.mk
     14 
     15 # Common components
     16 include Make_all.mak
     17 
     18 .SUFFIXES:
     19 .SUFFIXES: .c .o .txt .html
     20 .PHONY: all vimtags noerrors perlhtml clean test_urls
     21 
     22 all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
     23 
     24 # Use Vim to generate the tags file.  Can only be used when Vim has been
     25 # compiled.  Supports multiple languages.
     26 vimtags: $(DOCS)
     27 	@$(VIMPROG) --clean -esX -V1 -u doctags.vim
     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 >$@
     32 	uniq -d -2 tags
     33 
     34 doctags: doctags.c
     35 	$(CC) doctags.c -o doctags
     36 
     37 vim.man: vim.1
     38 	nroff -c -man $? | sed -e s/.//g > $@
     39 
     40 evim.man: evim.1
     41 	nroff -c -man $? | sed -e s/.//g > $@
     42 
     43 vimdiff.man: vimdiff.1
     44 	nroff -c -man $? | sed -e s/.//g > $@
     45 
     46 vimtutor.man: vimtutor.1
     47 	nroff -c -man $? | sed -e s/.//g > $@
     48 
     49 xxd.man: xxd.1
     50 	nroff -c -man $? | sed -e s/.//g > $@
     51 
     52 # Awk version of .txt to .html conversion.
     53 html: noerrors tags $(HTMLS)
     54 	@if test -f errors.log; then more errors.log; fi
     55 
     56 noerrors:
     57 	-rm -f errors.log
     58 
     59 $(HTMLS): tags.ref
     60 
     61 .txt.html:
     62 	$(AWK) -f makehtml.awk $< >$@
     63 
     64 # index.html is the starting point for HTML, but for the help files it is
     65 # help.txt.  Therefore use vimindex.html for index.txt.
     66 index.html: help.txt
     67 	$(AWK) -f makehtml.awk $? >$@
     68 
     69 vimindex.html: index.txt
     70 	$(AWK) -f makehtml.awk $? >$@
     71 
     72 tags.ref tags.html: tags
     73 	$(AWK) -f maketags.awk tags >tags.html
     74 
     75 # Perl version of .txt to .html conversion.
     76 # There can't be two rules to produce a .html from a .txt file.
     77 # Just run over all .txt files each time one changes.  It's fast anyway.
     78 perlhtml: tags $(DOCS)
     79 	./vim2html.pl tags $(DOCS)
     80 
     81 # Check URLs in the help with "curl".
     82 test_urls:
     83 	$(VIMPROG) --clean -S test_urls.vim
     84 
     85 clean:
     86 	-rm -f doctags *.html tags.ref tags-* vim-stylesheet.css
     87 
     88 # These files are in the extra archive, skip if not present
     89 
     90 arabic.txt:
     91 	touch $@
     92 
     93 farsi.txt:
     94 	touch $@
     95 
     96 hebrew.txt:
     97 	touch $@
     98 
     99 russian.txt:
    100 	touch $@
    101 
    102 gui_w32.txt:
    103 	touch $@
    104 
    105 if_ole.txt:
    106 	touch $@
    107 
    108 os_390.txt:
    109 	touch $@
    110 
    111 os_amiga.txt:
    112 	touch $@
    113 
    114 os_beos.txt:
    115 	touch $@
    116 
    117 os_dos.txt:
    118 	touch $@
    119 
    120 os_haiku.txt:
    121 	touch $@
    122 
    123 os_mac.txt:
    124 	touch $@
    125 
    126 os_mint.txt:
    127 	touch $@
    128 
    129 os_msdos.txt:
    130 	touch $@
    131 
    132 os_os2.txt:
    133 	touch $@
    134 
    135 os_qnx.txt:
    136 	touch $@
    137 
    138 os_risc.txt:
    139 	touch $@
    140 
    141 os_win32.txt:
    142 	touch $@
    143 
    144 pi_netrw.txt: ../pack/dist/opt/netrw/doc/netrw.txt
    145 	cp ../pack/dist/opt/netrw/doc/netrw.txt $@.tmp
    146 	sed -e '1s/$$/	*pi_netrw.txt*/' $@.tmp > $@ && \
    147 	rm -f $@.tmp
    148 
    149 vietnamese.txt:
    150 	touch $@
    151 
    152 # In *BSD, the variable '$<' is used in suffix-transformation rules (in GNU this
    153 # is called "implicit rules", and in MS Windows it is called "inference rules").
    154 # For code portability, it is better to use the '$?' variable for explicit rules.
    155 # Especially since there is only one dependency and it should presumably always
    156 # be newer than the target file.
    157 vim-da.UTF-8.1: vim-da.1
    158 	iconv -f latin1 -t UTF-8 $? >$@
    159 
    160 vimdiff-da.UTF-8.1: vimdiff-da.1
    161 	iconv -f latin1 -t UTF-8 $? >$@
    162 
    163 vimtutor-da.UTF-8.1: vimtutor-da.1
    164 	iconv -f latin1 -t UTF-8 $? >$@
    165 
    166 vim-de.UTF-8.1: vim-de.1
    167 	iconv -f latin1 -t UTF-8 $? >$@
    168 
    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 
    184 vim-it.UTF-8.1: vim-it.1
    185 	iconv -f latin1 -t UTF-8 $? >$@
    186 
    187 evim-it.UTF-8.1: evim-it.1
    188 	iconv -f latin1 -t UTF-8 $? >$@
    189 
    190 vimdiff-it.UTF-8.1: vimdiff-it.1
    191 	iconv -f latin1 -t UTF-8 $? >$@
    192 
    193 vimtutor-it.UTF-8.1: vimtutor-it.1
    194 	iconv -f latin1 -t UTF-8 $? >$@
    195 
    196 xxd-it.UTF-8.1: xxd-it.1
    197 	iconv -f latin1 -t UTF-8 $? >$@
    198 
    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 
    214 vim-ru.UTF-8.1: vim-ru.1
    215 	iconv -f KOI8-R -t UTF-8 $? >$@
    216 
    217 evim-ru.UTF-8.1: evim-ru.1
    218 	iconv -f KOI8-R -t UTF-8 $? >$@
    219 
    220 vimdiff-ru.UTF-8.1: vimdiff-ru.1
    221 	iconv -f KOI8-R -t UTF-8 $? >$@
    222 
    223 vimtutor-ru.UTF-8.1: vimtutor-ru.1
    224 	iconv -f KOI8-R -t UTF-8 $? >$@
    225 
    226 xxd-ru.UTF-8.1: xxd-ru.1
    227 	iconv -f KOI8-R -t UTF-8 $? >$@
    228 
    229 vim-tr.UTF-8.1: vim-tr.1
    230 	iconv -f latin5 -t UTF-8 $? >$@
    231 
    232 evim-tr.UTF-8.1: evim-tr.1
    233 	iconv -f latin5 -t UTF-8 $? >$@
    234 
    235 vimdiff-tr.UTF-8.1: vimdiff-tr.1
    236 	iconv -f latin5 -t UTF-8 $? >$@
    237 
    238 vimtutor-tr.UTF-8.1: vimtutor-tr.1
    239 	iconv -f latin5 -t UTF-8 $? >$@
    240 
    241 vim-sv.UTF-8.1: vim-sv.1
    242 	iconv -f latin1 -t UTF-8 $? >$@
    243 
    244 evim-sv.UTF-8.1: evim-sv.1
    245 	iconv -f latin1 -t UTF-8 $? >$@
    246 
    247 vimdiff-sv.UTF-8.1: vimdiff-sv.1
    248 	iconv -f latin1 -t UTF-8 $? >$@
    249 
    250 vimtutor-sv.UTF-8.1: vimtutor-sv.1
    251 	iconv -f latin1 -t UTF-8 $? >$@
    252 
    253 xxd-sv.UTF-8.1: xxd-sv.1
    254 	iconv -f latin1 -t UTF-8 $? >$@