Debian Codegraph @

nsis/Makefile

raw
1 #
2 # Makefile for UNIX-like for create self-installing exe of Vim.
3 # 2025-10-03, Restorer, [email protected]
4 #
5
6
7 .SUFFIXES:
8 .PHONY: all makeinst prepare rename clean
9
10 ifdef VIMSRC
11 MKNSISFLAGS := -D"VIMSRC=$(VIMSRC)"
12 endif
13
14 ifdef VIMRT
15 MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMRT=$(VIMRT)"
16 endif
17
18 ifdef VIMTOOLS
19 MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMTOOLS=$(VIMTOOLS)"
20 endif
21
22 ifdef GETTEXT
23 MKNSISFLAGS := $(MKNSISFLAGS) -D"GETTEXT=$(GETTEXT)"
24 endif
25
26 ifdef HAVE_UPX
27 MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_UPX=$(HAVE_UPX)
28 endif
29
30 ifdef HAVE_NLS
31 MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_NLS=$(HAVE_NLS)
32 endif
33
34 ifdef HAVE_MULTI_LANG
35 MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
36 endif
37
38 ifdef WIN64
39 MKNSISFLAGS := $(MKNSISFLAGS) -DWIN64=$(WIN64)
40 endif
41
42 ifdef ARM64
43 MKNSISFLAGS := $(MKNSISFLAGS) -DARM64=$(ARM64)
44 endif
45
46 ifdef INCLUDE_LIBGCC
47 MKNSISFLAGS := $(MKNSISFLAGS) -DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
48 endif
49
50 ifdef X
51 XX := -X"$(X:;=" -X")"
52 endif
53
54 MKNSISFLAGS := -INPUTCHARSET UTF8 $(MKNSISFLAGS)
55
56 all: makeinst
57
58 makeinst: prepare
59 makensis $(MKNSISFLAGS) gvim.nsi $(XX)
60
61 prepare: unzipicons license rename
62
63 unzipicons: icons.zip
64 if test -d `basename $? .zip` ; then rm -rf `basename $? .zip` ; fi
65 unzip $?
66
67 license: ../lang/LICENSE.*.txt ../LICENSE
68 for lic in $? ; do \
69 bn=`basename $$lic .txt` ; \
70 awk 'sub("$$", "\r")' < $$lic | \
71 iconv -f UTF-8 -t UTF-16 > ../lang/$$bn.nsis.txt ; \
72 done
73
74 rename:
75 ../tools/rename.bat "$(SRC)" "$(DST)"
76
77 clean:
78 rm -f ../lang/LICENSE*.nsis.txt
79 if test -d icons ; then rm -rf icons ; fi
80 if test -f gvim??.exe ; then rm -f gvim??.exe ; fi
81
82 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: