Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 310 lines (238 sloc) 13.187 kb
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
1 HOW TO COMPILE & INSTALL ELVIS 2.1
2
3 Separate sets of instructions are provided below for UNIX, Windows-NT,
4 MS-DOS, and OS/2.
5
6 For Win32 and MS-DOS, I've constructed batch files which, when run, cause
7 the programs to be compiled. This is the preferred way to compile elvis
8 and its related programs. However, you can also use MSVC++'s interactive
9 development environment if you prefer. Separate instructions are given
10 for both compilation methods, for both operating systems.
11
12 All of these instructions assume that you have already unpacked the files
13 from the source code archive, "elvis-2.1.tar.gz". That's a gzipped tar
14 archive. If you don't have the gzip and tar utilities, then the easiest
15 way for you to unpack them is to compile the "untar.c" program (available
16 via anonymous FTP from ftp://ftp.cs.pdx.edu/pub/elvis/untar.c). The files
17 will be placed in a subdirectory named "elvis-2.1". The MS-DOS *.MAK files
18 assume that you've unpacked them while in C:\MSVC, so the files themselves
19 should end up in C:\MSVC\elvis-2.1.
20
21 ================================================================================
22
23 UNIX
24 1) Run the "configure" shell script to create "Makefile" and "config.h"
25 files. I tried to make this "configure" script work about the same
26 as GNU ones. For a complete list of options, run "configure -?"
27 Here's a list of some of the more important ones, but YOU PROBABLY
28 DON'T NEED TO USE ANY OF THEM because the defaults are pretty smart.
29
30 --verbose
31 This causes "configure" to output an explanation for each
32 decision that it makes. If "configure" isn't configuring
33 elvis correctly for your system, then you should rerun it
34 with "--verbose" to see why.
35
36 --with-x[=no]
37 This forces elvis to include support for X-windows, or
38 (with "=no") forces it not to support X-windows. If you
39 omit this flag, configure will automatically detect
40 whether X is installed on your system, and use it if
41 available.
42
43 --without-x
44 This is a synonym for "--with-x=no".
45
46 --x-includes=directory
47 configure has a built-in list of likely places where
48 X-windows header files might be installed. This argument
49 adds another possible location to the list. The list is
50 used for the automatic inspection if "--with-x[=no]" was
51 omitted, and the actual directory where the files were
52 found are incorporated into the Makefile.
53
54 The X-windows header files are actually expected to
55 reside in a subdirectory named "X11" under the given
56 directory. For example, if your system has a file named
57 /usr/local/X11R6/include/X11/X.h then you would give the
58 argument "--x-includes=/usr/local/X11R6/include"
59
60 --x-libraries=directory
61 Similarly, this adds a directory to the list of
62 directories where X-windows libraries might reside. The
63 directory where they actually do reside is incorporated
64 into the Makefile.
65
66 --bindir=directory
67 This value is incorporated into the Makefile. The
68 command "make install" will copy the executables into
69 this directory. The default is /usr/local/bin.
70
71 --datadir=directory
72 This is incorporated into both the Makefile and the
73 config.h file. It is the directory where elvis' support
74 files will reside after a "make install". The default is
75 /usr/local/lib/elvis.
76
77 --libs=string
78 This option allows you to specify which library to use
79 for the "termcap" user interface. It will usually be
80 either -ltermcap or -lcurses.
81
82 --ioctl=tty-style
83 There are three possibilities: termios, termio, and
84 sgtty. These use Posix, SysV, and BSD terminal control
85 calls, respectively. The Posix termios calls usually
86 work best. The default is chosen by inspecting the
87 header files in /usr/include.
88
89 2) Give the command "make". This should eventually produce programs
90 named "elvis" and "ref". Source code is also included for "ctags"
91 and "fmt" but these aren't normally compiled because your UNIX system
92 probably already has better versions of them. If you want to use
93 elvis' versions of "ctags" and "fmt" then you should edit the Makefile
94 to add those programs to the definition of the ALL macro.
95
96 Exception: Linux gets all four programs by default, because the
97 versions of "ctags" and "fmt" distributed with Linux actually came
98 from elvis 1.8, so the 2.1 versions are newer.
99
100 3) You should be able to run "elvis" in the source code directory now.
101 Try "e2 README.html" or "e2 config.h".
102
103 Note that we're running the e2 shell script instead of the elvis
104 executable. e2 simply runs elvis in such a way that it looks for
105 its support files in the "lib" subdirectory, instead of the usual
106 directory.
107
108 4) If all goes well, you can install elvis by becoming the superuser and
109 running the command "make install". (Later, if you decide to uninstall
110 it you can do so via the command "make uninstall".)
111
112 --------------------------------------------------------------------
113 | NOTE: If you want to compile elvis with multiple configurations, |
114 | you should compile it with each configuration separately, and then |
115 | rename the executables, and "make clean" before running the |
116 | configure script for the next configuration. For example, to make |
117 | elvis both with and without X-windows, you could... |
118 | |
119 | configure --with-x linux |
120 | make |
121 | mv elvis xelvis |
122 | make clean |
123 | configure --with-x=no linux |
124 | make |
125 --------------------------------------------------------------------
126
127 ================================================================================
128
129 NOTE FOR WINDOWS/NT: The "vi.exe", "ex.exe", and "view.exe" programs have been
130 reported to cause problems under NT. If they don't work on your system, then
131 I suggest you replace them with the equivalent batch files. Each batch file
132 would be just one line long:
133
134 vi.bat: elvis %1 %2 %3 %4 %4 %5 %6 %7 %8 %9
135 ex.bat: elvis -e %1 %2 %3 %4 %4 %5 %6 %7 %8 %9
136 view.bat: elvis -R %1 %2 %3 %4 %4 %5 %6 %7 %8 %9
137
138
139 MS-Windows/NT (or Windows95?), with Visual C++ 2.0 (Method #1):
140 1) Run the "makwin32.bat" file.
141
142 makwin32
143
144 2) You can install elvis.exe by copying it into some directory in your
145 execution path, and the "lib" files into a subdirectory named "lib"
146 under the directory where you installed elvis.exe. The following
147 commands are APPROXIMATELY what you need to do:
148
149 mkdir \localbin
150 copy *.exe \localbin
151 path %path%;\localbin
152 mkdir \localbin\lib
153 copy lib\*.* \localbin\lib
154
155
156 MS-Windows/NT (or Windows95?), with Visual C++ 2.0 (Method #2):
157 1) Copy all of the "*.mak" files from files from the oswin32 subdirectory.
158
159 copy oswin32\*.mak
160
161 2) Copy the file "osconfig.h" from the oswin32 directory to "config.h"
162 (without the initial "os") in the current directory.
163
164 copy oswin32\osconfig.h config.h
165
166 3) Start Visual C++ 2.0, and open the "elvis.mak" file. Select the
167 "Release" target.
168
169 4) Select the "Project->Build elvis.exe" menu item, and wait a while.
170 Eventually this should give you an "elvis.exe" program in the
171 WinRel subdirectory. You can test this program from inside
172 VC++ via the <F5> key.
173
174 5) Repeat steps 3 and 4 for the "ctags.mak", "ref.mak", and "fmt.mak"
175 files.
176
177 6) You can install elvis.exe by copying it into some directory in your
178 execution path, and the "lib" files into a subdirectory named "lib"
179 under the execution directory. The following commands are
180 APPROXIMATELY what you need to do:
181
182 mkdir \localbin
183 copy WinRel\*.exe \localbin
184 copy *.exe \localbin
185 path %path%;\localbin
186 mkdir \localbin\lib
187 copy lib\*.* \localbin\lib
188
189 ================================================================================
190
191 MS-DOS, using Visual C++ 1.5 (Method #1):
192 REMINDER: MSVC++ 1.5 always puts the complete pathnames of all files
193 into its NMAKE files. Because of this, you *MUST* install the
194 source code into a directory named "C:\MSVC\elvis-2.1". The
195 "elvis-2.1" component of that directory name is stored in the
196 "elvis-2.1.tar.gz" archive file, so you should be in the C:\MSVC
197 directory when you extract the files. After extracting the files,
198 do a "cd elvis-2.1"
199
200 1) Run the "makmsdos.bat" file
201
202 makmsdos
203
204 2) You can install elvis by copying the *.EXE files into some directory
205 in your execution path, and copying the "lib" files into a subdirectory
206 named "lib" under the directory where you installed the *.EXE files.
207 The following commands are APPROXIMATELY what you need to do:
208
209 mkdir \localbin
210 copy *.exe \localbin
211 mkdir \localbin\lib
212 copy \lib\*.* \localbin\lib
213 path {OLD PATH HERE};\localbin
214
215 MS-DOS, using Visual C++ 1.5 (Method #2):
216 REMINDER: MSVC++ 1.5 always puts the complete pathnames of all files
217 into its NMAKE files. Because of this, you *MUST* install the
218 source code into a directory named "C:\MSVC\elvis-2.1". The
219 "elvis-2.1" component of that directory name is stored in the
220 "elvis-2.1.tar.gz" archive file, so you should be in the C:\MSVC
221 directory when you extract the files.
222
223 1) Copy all of the "C:\MSVC\elvis-2.1\OSMSDOS\*.MAK" files into the
224 "C:\MSVC\elvis-2.1" directory.
225
226 c:
227 cd \msvc\elvis-2.1
228 copy osmsdos\*.mak
229
230 2) Copy the "\MSVC\elvis-2.1\OSMSDOS\OSCONFIG.H" file to
231 "\MSVC\elvis-2.1\CONFIG.H" Note that the "OS" is dropped from the
232 filename.
233
234 copy osmsdos\osconfig.h config.h
235
236 3) Start Visual C++ 1.5, and open the "ELVIS.MAK" project.
237
238 4) Select the "Project->Build ELVIS.EXE" menu item, and wait a while.
239 Eventually this should give you an "ELVIS.EXE" program in the
240 current directory. You can test this program from inside VC++
241 via the <F5> key.
242
243 5) Repeat steps 3 and 4 for "CTAGS.MAK", "REF.MAK", and "FMT.MAK".
244
245 6) You can install elvis by copying the *.EXE files into some directory
246 in your execution path, and copying the "lib" files into a subdirectory
247 named "lib" under the directory where you installed the *.EXE files.
248 The following commands are APPROXIMATELY what you need to do:
249
250 mkdir \localbin
251 copy *.exe \localbin
252 mkdir \localbin\lib
253 copy lib\*.* \localbin\lib
254 path {OLD PATH HERE};\localbin
255
256 ================================================================================
257
258 OS/2, using IBM VisualAge C++ 3.0, IBM CSet++ 2.01 or emx/gcc and GNU
259 "make". To use IBM's nmake instead of GNU make, edit the "makos2.cmd"
260 file and replace "make" with "nmake".
261
262 To use a different compiler... good luck. Basically you need to change
263 the setting of the "CC" macro in the Makefile, but there also come
264 compiler flags which you may need to change, and that's going to be a
265 challenge.
266
267 1) Run "makos2.cmd" with no arguments to compile elvis with TCP/IP
268 support. If your system doesn't have TCP/IP software installed,
269 then you can skip this step.
270
271 makos2
272
273 2) Run "makos2.cmd" with "--no-tcp" as an argument to compile elvis
274 without TCP/IP support. The resulting binary will be named
275 "elvis-no-tcp.exe". If you do have TCP/IP installed on your
276 computer, and never expect to use elvis on a non-TCP/IP system,
277 then you can skip this step.
278
279 makeos2 --no-tcp
280
281 3) To compile Elvis using emx/gcc linked against emx.dll providing
282 additional Termcap support use the "--with-emx" switch. The
283 resulting binaries will all end "emx.exe", like "refemx.exe":
284
285 makeos2 --with-emx
286
287 4) To compile Elvis using emx/gcc not needing emx.dll and not
288 providing TCP/IP support use the "--with-gcc" switch. The
289 resulting binaries will all end "gcc.exe", like "refgcc.exe":
290
291 makeos2 --with-gcc
292
293 5) You can install elvis by copying the *.exe files into some directory
294 in your execution path, and copying the "lib" files into a subdirectory
295 named "lib" under the directory where you installed the *.exe files.
296 The following commands are APPROXIMATELY what you need to do:
297
298 mkdir \localbin
299 copy *.exe \localbin
300 mkdir \localbin\lib
301 copy lib\*.* \localbin\lib
302 path {OLD PATH HERE};\localbin
303
304 After installing the files you should set the ELVISPATH environment
305 variable in your CONFIG.SYS file to the directory containing all the
306 stuff from the lib\ directory. This could look like:
307
308 set ELVISPATH=c:\localbin\lib
309
Something went wrong with that request. Please try again.