-
Notifications
You must be signed in to change notification settings - Fork 42
/
makeit.bat
executable file
·209 lines (189 loc) · 7.47 KB
/
makeit.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
@echo off
rem ---
rem --- common install batch file for Meadow & NTEmacs
rem --- 1999/07/07, Masaki YATSU mailto:[email protected]
rem --- cmail ML member
rem --- modified 1999/12/01, Yuh Ohmura, mailto:[email protected]
rem --- modified 2000/12/26, Takeshi Morishima mailto:[email protected]
set ELISPMK_APP=skk
rem --- Japanese Comments:
rem ---
rem --- 引数
rem --- 引数については make1.bat のコメントを参照してください.
rem --- makeit.bat は、環境変数を設定した後に make1.bat を呼び出します。
rem ---
rem --- 変数設定
rem --- このコメントのあとにある PREFIX, EMACS, EXEC_PREFIX, LISPDIR,
rem --- INFODIR, VERSION_SPECIFIC_LISPDIR の各変数を,お使いの環境に
rem --- 適当に合せて設定してください.
rem --- 特にEMACS の値として emacs.exe を指定するのを忘れないように.
rem ---
rem --- 適宜指定が終った makeit.bat は下のいずれかのファイルとして
rem --- コピーしておくとそちらを優先して実行します。(アップグレード
rem --- の際に makeit.bat を再編集する必要がありません.) 優先順に:
rem ---
rem --- 1-1. %HOME%\.elispmk.%ELISPMK_APP%.bat
rem --- 1-2. %HOME%\elisp\elispmk.%ELISPMK_APP%.bat
rem --- 1-3. %HOME%\config\elispmk.%ELISPMK_APP%.bat
rem --- 1-4. c:\Program Files\Meadow\elispmk.%ELISPMK_APP%.bat
rem --- 1-5. c:\Meadow\elispmk.%ELISPMK_APP%.bat
rem --- 1-6. d:\Meadow\elispmk.%ELISPMK_APP%.bat
rem ---
rem --- 2-1. %HOME%\.elispmk.bat
rem --- 2-2. %HOME%\elisp\elispmk.bat
rem --- 2-3. %HOME%\config\elispmk.bat
rem --- 2-4. c:\Program Files\Meadow\elispmk.bat
rem --- 2-5. c:\Meadow\elispmk.bat
rem --- 2-6. d:\Meadow\elispmk.bat
rem ---
rem --- となります。
rem ---
rem --- English Comments:
rem ---
rem --- Arguments
rem --- Please refer to comment section of make1.bat. Makeit.bat
rem --- will perform installation procedure by executing make1.bat.
rem ---
rem --- Specifying variables
rem --- After this comment section, PREFIX, EMACS, EXEC_PREFIX,
rem --- LISPDIR, INFODIR, VERSION_SPECIFIC_LISPDIR is defined using
rem --- 'set' batch command. Please specify them appropriately
rem --- according to your Emacs environment. Especially remember to set
rem --- the EMACS variable to emacs.exe.
rem ---
rem --- After modification, you may make a copy of makeit.bat as a pre-
rem --- configured file as one of the following name. Any future
rem --- execution of makeit.bat will automatically use this pre-
rem --- configured batch file instead of makeit.bat itself. (When
rem --- upgrading new distribution file for example, you do not have to
rem --- make modification to makeit.bat again.) A pre-configured batch
rem --- file is searched in order listed below:
rem ---
rem --- 1-1. %HOME%\.elispmk.%ELISPMK_APP%.bat
rem --- 1-2. %HOME%\elisp\elispmk.%ELISPMK_APP%.bat
rem --- 1-3. %HOME%\config\elispmk.%ELISPMK_APP%.bat
rem --- 1-4. c:\Program Files\Meadow\elispmk.%ELISPMK_APP%.bat
rem --- 1-5. c:\Meadow\elispmk.%ELISPMK_APP%.bat
rem --- 1-6. d:\Meadow\elispmk.%ELISPMK_APP%.bat
rem ---
rem --- 2-1. %HOME%\.elispmk.bat
rem --- 2-2. %HOME%\elisp\elispmk.bat
rem --- 2-3. %HOME%\config\elispmk.bat
rem --- 2-4. c:\Program Files\Meadow\elispmk.bat
rem --- 2-5. c:\Meadow\elispmk.bat
rem --- 2-6. d:\Meadow\elispmk.bat
rem --- 変数設定の例 (Example of variable definition)
rem --- c:\usr\emacs にインストールされている Emacs 24.4 を使用
rem --- している場合の設定例. (An example of variable definition. In
rem --- this example, Emacs 24.4 installed in c:\usr\emacs directory
rem --- is used.)
rem --- set PREFIX=
rem --- set EMACS=c:\usr\bin\emacs.exe
rem --- set EXEC_PREFIX=
rem --- set LISPDIR=
rem --- set VERSION_SPECIFIC_LISPDIR=
rem --- set DEFAULT_MAKE_ARG=elc
rem --- 安全のためデフォルトの値はすべて空文字列になっています。
rem --- Emacs 24.4 以降はそれまでの Emacs とディレクトリ構造が変更になっています。
rem --- インストーラーはインストール先のディレクトリ構造を自動的に検知しますので、
rem --- 特に必要の無い場合は上記の例の EMACS のみを変更して下さい。
rem --- (To take a
rem --- safe side, default values are all set to null strings. Please
rem --- specify these variables accordingly for your system.)
rem --- なお、DEFAULT_MAKE_ARG に可能な値は make1.bat を御覧ください。
rem --- (Please see make1.bat for possible values of DEFAULT_MAKE_ARG.)
set PREFIX=
set EMACS=
set LISPDIR=
set DEFAULT_MAKE_ARG=
rem --- makeit.bat 内から呼ばれている場合は再帰呼び出しをせず make1 を実行
if not "%ELISPMK%"=="" goto execsubmk
rem ---
set ELISPMK=%HOME%\.elispmk.%ELISPMK_APP%.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=%HOME%\elisp\elispmk.%ELISPMK_APP%.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=%HOME%\config\elispmk.%ELISPMK_APP%.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK="c:\Program Files\Meadow\elispmk.%ELISPMK_APP%.bat"
if exist %ELISPMK% goto execelmkb
set ELISPMK=c:\Meadow\elispmk.%ELISPMK_APP%.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=d:\Meadow\elispmk.%ELISPMK_APP%.bat
if exist %ELISPMK% goto execelmkb
rem ---
set ELISPMK=%HOME%\.elispmk.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=%HOME%\elisp\elispmk.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=%HOME%\config\elispmk.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK="c:\Program Files\Meadow\elispmk.bat"
if exist %ELISPMK% goto execelmkb
set ELISPMK=c:\Meadow\elispmk.bat
if exist %ELISPMK% goto execelmkb
set ELISPMK=d:\Meadow\elispmk.bat
if exist %ELISPMK% goto execelmkb
echo ----
echo INFORMATIVE: No pre-configured batch (e.g. ~/.elispmk.bat
echo INFORMATIVE: or ~/.elispmk.%ELISPMK_APP%.bat) found.
echo INFORMATIVE: You may create one for your convenience.
echo INFORMATIVE: See comments in makeit.bat.
echo ----
:execsubmk
set ELISPMK=
rem --- %EMACS% が未定義又は不存在の場合はエラー終了する
if "%EMACS%"=="" goto errnotspecified
if not exist "%EMACS%" goto errnonexistent
rem --- MAKE1.BAT Control
set SUBMAKEOK=OK
echo ----
echo Executing make1.bat in the current directory using the following env.
echo HOME=%HOME%
echo PREFIX=%PREFIX%
echo EMACS=%EMACS%
echo EXEC_PREFIX=%EXEC_PREFIX%
echo LISPDIR=%LISPDIR%
echo INFODIR=%INFODIR%
echo VERSION_SPECIFIC_LISPDIR=%VERSION_SPECIFIC_LISPDIR%
echo ----
set ARG=%1
if "%ARG%"=="" set ARG=%DEFAULT_MAKE_ARG%
echo Executing .\make1.bat with argument=%ARG%
.\make1.bat %ARG%
echo Error: for some reason .\make1.bat could not be executed.
echo Please check if .\make1.bat exists and correct.
goto pauseend
:execelmkb
echo ----
echo Found %ELISPMK%. Executing it...
echo ----
%ELISPMK% %1
echo Error: for some reason %ELISPMK% could not be executed.
echo Please check if ELISPMK=%ELISPMK% exists and correct.
goto printenv
rem --- %EMACS% が設定されていない
:errnotspecified
echo Error: Environment variable EMACS is not specified.
goto printenv
rem --- %EMACS% に設定されているファイルが存在しない
:errnonexistent
echo Error: EMACS=%EMACS% does not exist.
:printenv
echo ----
echo Check correctness of the following environment variables.
echo HOME=%HOME%
echo PREFIX=%PREFIX%
echo EMACS=%EMACS%
echo EXEC_PREFIX=%EXEC_PREFIX%
echo LISPDIR=%LISPDIR%
echo INFODIR=%INFODIR%
echo VERSION_SPECIFIC_LISPDIR=%VERSION_SPECIFIC_LISPDIR%
echo DEFAULT_MAKE_ARG=%DEFAULT_MAKE_ARG%
echo See comments in makeit.bat and make1.bat for setup instruction.
echo ----
:pauseend
echo Type any key when you're done reading the error message.
pause
rem --- end of makeit.bat
:end