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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
|
<!-- Title = configuring the system -->
<TABLE BORDER=0 CELLSPACING=5 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#3366FF" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<CENTER><FONT COLOR="#FFFFFF" SIZE=+3><B>System Configuration</B></FONT></CENTER>
</TD>
</TR>
</TABLE>
<BR><BR><BR>
<P>
System customisation is performed thanks to the
<CODE>"system.se"</CODE> file which must be in the
sub-directory <CODE>"sys"</CODE> of the installation directory.
</P><P>
When the system name is correctly set in the file
<CODE>"system.se"</CODE>,
SmartEiffel performs some automatic customisations.
For example, if the <CODE>"system.se"</CODE> file contains the
string "DOS", SmartEiffel uses the suffix <CODE>".BAT"</CODE> for script
files and the suffix <CODE>".EXE"</CODE> for executables files.
</P><P>
The <CODE>"sys"</CODE> directory contains various files to customise
SmartEiffel with the system, the C compiler and the linker used as well as
the default loadpath used to look for Eiffel source code.
</P>
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#3366FF" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><FONT COLOR="#FFFFFF" SIZE="+2">The <TT>SmartEiffel</TT> Environment Variable </FONT></TD>
</TR>
</TABLE>
<P>
Environment variable <TT>SmartEiffel</TT> must be set with the
absolute path of the file <CODE>"system.se"</CODE> which is in the
sub-directory <CODE>"sys"</CODE> of the installation directory.
<BR>
Under a UNIX-like system, the value of the <TT>SmartEiffel</TT>
environment variable may be for example:
<CODE>/usr/lib/SmartEiffel/sys/system.se</CODE>
<BR>
The contents of the file <CODE>"system.se"</CODE> indicate the
<A HREF="system.html">system</A>
you are running.
</P>
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#3366FF" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><FONT COLOR="#FFFFFF" SIZE="+2"><A NAME="systems"></A>File
<CODE>system.se</CODE></FONT></TD>
</TR>
</TABLE>
<P>
The first word of file <CODE>"system.se"</CODE> is used by SmartEiffel to
know which operating system is running.
Currently supported values are:
<TABLE>
<TR><TD><B>UNIX</B></TD>
<TD>for all UNIX-like systems, GNU/Linux, HP-UX, Solaris, SunOS, Irix, XENIX, etc.
</TD></TR>
<TR><TD><B>Windows</B></TD>
<TD> for Windows 95 and Windows NT systems (using long filenames).
</TD></TR>
<TR><TD><B>DOS</B></TD>
<TD> for MS-DOS systems or Windows 3.x (using short filenames, with 8.3 scheme).
</TD></TR>
<TR><TD><B>Macintosh</B></TD>
<TD> for Macintosh systems (68K and PPC)
</TD></TR>
<TR><TD><B>BeOS</B></TD>
<TD> for the BeOS system
</TD></TR>
<TR><TD><B>Amiga</B></TD>
<TD> for the Amiga system
</TD></TR>
<TR><TD><B>OS2</B></TD>
<TD> for IBM OS/2 systems
</TD></TR>
<TR><TD><B>VMS</B></TD>
<TD> for the VMS systems
</TD></TR>
</TABLE>
<P>
You must choose the appropriate system name in the previous list and update
file <CODE>"system.se"</CODE>.
To be sure that the previous list is up-to-date, just put a bad system name
in the file <CODE>"system.se"</CODE> and then run for example command
<TT>compile</TT>.
</P><P>
The system name will then be used to access various files corresponding
to the system you chose.
For example, if you declared "Windows",
only files with extension "Windows" will be considered (e.g. files
like <CODE>"loadpath.Windows"</CODE>,
<CODE>"compiler.Windows"</CODE>,
<CODE>"linker.Windows"</CODE>,
etc...).
</P>
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#3366FF" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><FONT COLOR="#FFFFFF" SIZE="+2">File <CODE>compiler.se</CODE></I></FONT></TD>
</TR>
</TABLE>
<P>
This file is used to select the default C compiler that will be used to compile
the generated C code.
Only the first line of this file is considered; it must contain the name of
one of the supported compilers, which at the current time are:
<TABLE COLUMNS=2>
<TR><TD><B>gcc</B></TD><TD>The free and open-source GNU C Compiler and its variants
(egcs, mingw32, etc.) on several platforms (Linux and other UNIXes, Windows).
</TD></TR>
<TR><TD><B>cc</B></TD><TD>The standard cc compiler, as provided by vendors of most UNIX
and VMS systems.</TD></TR>
<TR><TD><B>lcc-win32</B></TD><TD>The free port of lcc for Windows platforms.</TD></TR>
<TR><TD><B>bcc32</B></TD><TD>The Borland (now Inprise) C/C++ compiler on Windows platforms.</TD></TR>
<TR><TD><B>bcc32i</B></TD><TD>A variant of the previous one.</TD></TR>
<TR><TD><B>wcl386</B></TD><TD>The Watcom C/C++ compiler for Windows platforms.</TD></TR>
<TR><TD><B>cl</B></TD><TD>The MicroSoft C/C++ compiler for Windows platforms.</TD></TR>
<TR><TD><B>sas_c</B></TD><TD>The SAS C compiler, sc on Amiga platforms.</TD></TR>
<TR><TD><B>dice</B></TD><TD>The dice C compiler.</TD></TR>
<TR><TD><B>vbcc</B></TD><TD>The vbcc C compiler.</TD></TR>
<TR><TD><B>ccc</B></TD><TD>The Compaq C compiler for AlphaLinux.</TD></TR>
<TR><TD><B>sc</B></TD><TD>??</TD></TR>
<TR><TD><B>vpcc</B></TD><TD>??</TD></TR>
<TR><TD><B>OpenVMS_CC</B></TD><TD>??</TD></TR>
<TR><TD><B>tcc</B></TD><TD>The Tiny C Compiler. Fast and small (Windows or Linux)</TD></TR>
</TABLE>
</P>
<P>
SmartEiffel will automatically generate the correct system call to this C compiler,
with the appropriate linker and adequate object files suffix.
</P>
In case an unknown compiler name is supplied, SmartEiffel generates an error message
listing the supported compiler names.
In case the compiler specified is a correct one but can't be found, SmartEiffel
won't be able to detect it, but there will be an error message from the system.
In <CODE>-verbose</CODE> mode, the systems calls to the C compiler are displayed,
thus making it easy to find such errors.
</P>
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#3366FF" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><FONT COLOR="#FFFFFF" SIZE="+2">Changing the Default Loading Path</FONT></TD>
</TR>
</TABLE>
<P>
All the commands use the same algorithm to search for Eiffel source files.
The default global loading path is set using contents of file
<CODE>loadpath.<<I>system_name</I>></CODE>, in the <CODE>sys</CODE> directory
of your SmartEiffel installation, where <CODE><<I>system_name</I>></CODE> is
one of the systems symbols mentioned
<A HREF="system.html#systems">above</A>.
</P>
<P>
<A NAME="loadpath"></A>
To change this default loading path, you need to add a special
file which name is <CODE>"loadpath.se"</CODE> in the directory in which you
type a <A HREF="commands.html">command</A> of SmartEiffel
(<TT>compile</TT>, <TT>finder</TT>,
<TT>pretty</TT>, <TT>compile_to_c</TT>, <TT>compile_to_jvm</TT>, <TT>short</TT>,
<TT>clean</TT>).
</P>
<P>
Each line of the file <CODE>"loadpath.se"</CODE> must be an
existing directory path or the absolute path of another
<CODE>"loadpath.se"</CODE> file to include recursively.
Environment variable may be used in these lines, with the syntax
<CODE>${MY_VAR}</CODE>.
</P>
<P>
Additional information about the <CODE>${SmartEiffelDirectory}</CODE>
variable:
If not explicitly set by the user, the
<CODE>${SmartEiffelDirectory}</CODE> variable
is automatically computed using the value of the
<CODE>${SmartEiffel}</CODE> variable.
(Keep in mind that the <CODE>${SmartEiffel}</CODE> is mandatory to use
SmartEiffel.)
The computed value indicates the SmartEiffel main directory. For example,
if the <CODE>${SmartEiffel}</CODE> value is
<CODE>"/usr/local/lib/SmartEiffel/sys/system.se"</CODE>
the computed value is <CODE>"/usr/local/lib/SmartEiffel/"</CODE>.
This automatically defined variable
<CODE>${SmartEiffelDirectory}</CODE>
is useful to indicate the place of the SmartEiffel standard library.
</P>
<P>
All directories of the local <CODE>"loadpath.se"</CODE> file are
added <I>ahead of</I> the default loading path.
All directories are searched in the order in which they appear.
The current directory is not included in the search path unless it is
explicitly specified in one of the <CODE>loadpath.se</CODE> or
<CODE>loadpath.<I>system</I></CODE> files.
Also note that an empty line in a <CODE>loadpath.se</CODE> file may
add the current working directory in a place you don't want.
</P>
<P>To check that your loading path is correctly set, just
type command <CODE>finder</CODE> using an unknown class name as
argument.
</P>
<P>
<FONT COLOR="#a000a0"><B>Sample loadpath.se file under UNIX</B></FONT>
<BR><BR>
<CODE>
/users/myself/one_dir/<BR>
../../another_dir/<BR>
${MY_LIB}/goodies/<BR>
/users/${MY_BUDDY}/common/loadpath.se<BR>
./
</CODE>
<BR><BR>
The first line is an absolute path to some directory.<BR>
The second one is a relative path to some directory.<BR>
The third line shows the use of an environment variable to point to some directory.<BR>
The fourth line also features an environment variable, but points to a second loadpath
file, that will be included before the general <CODE>loadpath.UNIX</CODE> file.<BR>
The fifth line adds the current directory to the loadpath.
</P>
<P>
<FONT COLOR="#a000a0"><B>Sample loadpath.se file under Windows</B></FONT>
<BR><BR>
<CODE>
C:\myself\one_dir\<BR>
..\..\another_dir\<BR>
${MY_LIB}\goodies\<BR>
\users\${MY_BUDDY}\common\loadpath.se<BR>
.\
</CODE>
<BR><BR>
Same explanations as above, except of course that this file is prepended in front
of the <CODE>loadpath.Windows</CODE> file.
</P>
<CENTER><P><IMG SRC="se-line.gif" ALT="[Line]" HEIGHT=16 WIDTH=550>
<BR>
<I><FONT SIZE=-1>Copyright © Dominique COLNET and Suzanne COLLIN -
<A HREF="mailto:SmartEiffel@loria.fr"><SmartEiffel@loria.fr></A>
<BR>
<!-- hhmts start -->
Last modified: Tue Feb 11 12:18:27 CET 2003
<!-- hhmts end -->
<BR>
</FONT></I><BR></P></CENTER>
|