[go: up one dir, main page]

File: BUILDING.man

package info (click to toggle)
srecord 1.39-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,624 kB
  • ctags: 1,822
  • sloc: cpp: 18,283; sh: 5,839; makefile: 1,701; awk: 201; vhdl: 15
file content (510 lines) | stat: -rw-r--r-- 11,724 bytes parent folder | download
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
'\" t
.\"     srecord - manipulate eprom load files
.\"     Copyright (C) 1998, 2001, 2003, 2006, 2007 Peter Miller
.\"
.\"     This program is free software; you can redistribute it and/or modify
.\"     it under the terms of the GNU General Public License as published by
.\"     the Free Software Foundation; either version 3 of the License, or
.\"     (at your option) any later version.
.\"
.\"     This program is distributed in the hope that it will be useful,
.\"     but WITHOUT ANY WARRANTY; without even the implied warranty of
.\"     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\"     GNU General Public License for more details.
.\"
.\"     You should have received a copy of the GNU General Public License
.\"     along with this program. If not, see
.\"     <http://www.gnu.org/licenses/>.
.\"
.TH Build SRecord SRecord "Reference Manual"
.so version.so
.if n .hy 0
.if n .ad l
.if n .nr IN 8n
.SH NAME
How to build SRecord
.XX "" "How to build SRecord"
.SH SPACE REQUIREMENTS
You will need about 3MB to unpack and build the
.I SRecord
package.
Your milage may vary.
.br
.ne 1i
.SH BEFORE YOU START
There are a few pieces of software you may want to
fetch and install before you proceed with your installation of SRecord.
.TP 8n
GNU Groff
The documentation for the
.I SRecord
package was prepared using the GNU Groff package (version 1.14 or later).
This distribution includes full documentation,
which may be processed into PostScript or DVI files
at install time \- if GNU Groff has been installed.
.TP 8n
GCC
You may also want to consider fetching and installing the GNU C Compiler
if you have not done so already.  This is not essential.
SRecord was developed using the GNU C++ compiler, and the GNU C++ libraries.
.PP
The GNU FTP archives may be found at \f[CW]ftp.gnu.org\fP,
and are mirrored around the world.
.br
.ne 1i
.SH SITE CONFIGURATION
The
.B SRecord
package is configured using the
.I configure
program included in this distribution.
.PP
The
.I configure
shell script attempts to guess correct values for
various system-dependent variables used during compilation,
and creates the
.I Makefile
and
.I lib/config.h
files.
It also creates a shell script
.I config.status
that you can run in the future to recreate the current configuration.
.PP
Normally,
you just
.I cd
to the directory containing
.IR SRecord "'s"
source code and then type
.RS
.ft CW
.nf
\f[B]% \fP./configure
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
If you're using
.I csh
on an old version of System V,
you might need to type
.RS
.ft CW
.nf
\f[B]% \fPsh configure
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
instead to prevent
.I csh
from trying to execute
.I configure
itself.
.PP
Running
.I configure
takes a minute or two.
While it is running,
it prints some messages that tell what it is doing.
If you don't want to see the messages,
run
.I configure
using the quiet option;
for example,
.RS
.FT CW
.nf
\f[B]% \fP./configure --quiet
\bB%\fP
.fi
.ft R
.RE
.PP
To compile the
.B SRecord
package in a different directory from the one
containing the source code,
you must use a version of
.I make
that supports the
.I VPATH variable,
such as
.IR "GNU make" .
.I cd
to the directory where you want the object files and executables to go and run
the
.I configure
script.
.I configure
automatically checks for the source code in the directory that
.I configure
is in and in
.IR \&..
(the parent directory).
If for some reason
.I configure
is not in the source code directory that you are configuring,
then it will report that it can't find the source code.
In that case,
run
.I configure
with the option \f[CW]--srcdir=\fP\f[I]DIR\fP,
where
.I DIR
is the directory that contains the source code.
.PP
By default,
.I configure
will arrange for the
.I "make install"
command to install the
.B SRecord
package's files in
.IR /usr/local/bin ,
and
.IR /usr/local/man .
There are options which allow you to control the placement
of these files.
.TP 8n
\f[CW]--prefix=\fP\f[I]PATH\fP
This specifies the path prefix to be used in the installation.
Defaults to \f[I]/usr/local\fP unless otherwise specified.
.TP 8n
\f[CW]--exec-prefix=\fP\f[I]PATH\fP
You can specify separate installation prefixes for
architecture-specific files files.
Defaults to \f[I]${prefix}\fP unless otherwise specified.
.TP 8n
\f[CW]--bindir=\fP\f[I]PATH\fP
This directory contains executable programs.  On a network, this
directory may be shared between machines with identical hardware and
operating systems; it may be mounted read-only.  Defaults to
\f[I]${exec_prefix}/bin\fP unless otherwise specified.
.TP 8n
\f[CW]--mandir=\fP\f[I]PATH\fP
This directory contains the on-line manual entries.  On a network, this
directory may be shared between all machines; it may be mounted
read-only.  Defaults to \f[I]${prefix}/man\fP unless otherwise specified.
.PP
.I configure
ignores most other arguments that you give it;
use the \f[CW]--help\fP option for a complete list.
.br
.ne 2i
.PP
On systems that require unusual options for compilation or linking
that the
.I SRecord
package's
.I configure
script does not know about,
you can give
.I configure
initial values for variables by setting them in the environment.
In Bourne-compatible shells,
you can do that on the command line like this:
.RS
.ft CW
.nf
\f[B]$ \fPCXX='g++ -traditional' LIBS=-lposix ./configure
\f[I]\&...lots of output...\fP
\f[B]$\fP
.fi
.ft R
.RE
Here are the
.I make
variables that you might want to override with
environment variables when running
.IR configure .
.TP 8n
Variable: CXX
C++ compiler program.
The default is
.IR c++ .
.TP 8n
Variable: CPPFLAGS
Preprocessor flags, commonly defines and include search paths.
Defaults to empty.
It is common to use \f[CW]CPPFLAGS=-I/usr/local/include\fP to access other
installed packages.
.TP 8n
Variable: INSTALL
Program to use to install files.
The default is
.I install
if you have it,
.I cp
otherwise.
.TP 8n
Variable: LIBS
Libraries to link with,
in the form \f[CW]-l\fP\f[I]foo\fP \f[CW]-l\fP\f[I]bar\fP.
The
.I configure
script will append to this,
rather than replace it.
It is common to use \f[CW]LIBS=-L/usr/local/lib\fP to access other
installed packages.
.PP
If you need to do unusual things to compile the package,
the author encourages you to figure out how
.I configure
could check whether to do them,
and mail diffs or instructions to the author
so that they can be included in the next release.
.br
.ne 1i
.SH BUILDING SRECORD
All you should need to do is use the
.RS
.ft CW
.nf
\f[B]% \fPmake
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
command and wait.
When this finishes you should see a directory called
.I bin
containing three files:
.IR srec_cat ,
.IR srec_cmp
and
.IR srec_info .
.TP 8n
.B srec_cat
.The
.I srec_cat
program is used to manipulate and convert EPROM load files.
For more information, see
.IR srec_cat (1).
.TP 8n
.B srec_cmp
The
.I srec_cmp
program is used to compare EPROM load files.
For more information, see
.IR srec_cmp (1).
.TP 8n
.B srec_info
The
.I srec_info
program is used to print information about EPROM load files.
For more information, see
.IR srec_info (1).
.br
.ne 1.5i
.PP
If you have GNU Groff installed, the build will also create a
.I etc/reference.ps
file.  This contains the README file, this BUILDING file,
and all of the man pages.
.PP
You can remove the program binaries and object files from the
source directory by using the
.RS
.ft CW
.nf
\f[B]% \fPmake clean
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
command.
To remove all of the above files, and also remove the
.I Makefile
and
.I lib/config.h
and
.I config.status
files, use the
.RS
.ft CW
.nf
\f[B]% \fPmake distclean
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
command.
.PP
The file
.I etc/configure.in
is used to create
.I configure
by a GNU program called
.IR autoconf .
You only need to know this if you want to regenerate
.I configure
using a newer version of
.IR autoconf .
.SS Windows NT
It is possible to build SRecord on MS Windows platforms, using the Cygwin
(see \f[CW]www.cygwin.com\fP) or DJGPP (see
\f[CW]www.delorie.com/djgpp\fP) environments.  This provides the
\&``porting layer'' necessary to run Unix programs on Windows.  The build
process is exactly as described above.
.PP
\f[B]Note:\fP if you are using GCC 3.\f[I]x\fP where \f[I]x\fP < 4, you
may need to edit the
\f[I]Makefile\fP to change \f[CW]CXX = g++\fP to read \f[CW]CXX = g++-2\fP
to fix some weird undefined symbols.
This appears to be a bug in these versions of GCC.
The bug has apparently been fixed in GCC 3.4 and above.
.PP
DJGPP always produces native binaries, however
if you want to make native binaries with Cygwin (\f[I]i.e.\fP ones which
work outside Cygwin) there is one extra step you need after running
\f[CW]./configure\fP and before you run \f[CW]make\fP.  You need to
edit the \f[I]Makefile\fP file, and add \f[CW]-mno-cygwin\fP to the end of
the \f[CW]CXX=g++\fP line.
.PP
Once built (using either tool set) Windows binaries should be testable
in the same way as described in the next section.
However, there may be some CRLF issues in the text file comparisons
which give false negatives, depending on the CRLF setting of your Cygwin
file system when you unpacked the tarball.
.br
.ne 1i
.SH TESTING SRECORD
The
.I SRecord
package comes with a test suite.
To run this test suite, use the command
.RS
.ft CW
.nf
\f[B]% \fPmake sure
\f[I]\&...lots of output...\fP
.if n \f[B]Passed All Tests\fP
.if t \f[CB]Passed All Tests\fP
\f[B]%\fP
.fi
.ft R
.RE
.PP
The tests take a few seconds each,
with a few very fast,
and a couple very slow,
but it varies greatly depending on your CPU.
.PP
If all went well, the message
.RS
.ft CW
Passed All Tests
.ft R
.RE
should appear at the end of the make.
.br
.ne 1i
.SH INSTALLING SRECORD
As explained in the
.I "SITE CONFIGURATION"
section, above,
the
.I SRecord
package is installed under the
.I /usr/local
tree by default.
Use the \f[CW]--prefix=\fP\f[I]PATH\fP option to
.I configure
if you want some other path.
More specific installation locations are assignable,
use the \f[CW]--help\fP option to
.I configure
for details.
.PP
All that is required to install the
.I SRecord
package is to use the
.RS
.ft CW
.nf
\f[B]% \fPmake install
\f[I]\&...lots of output...\fP
\f[B]%\fP
.fi
.ft R
.RE
command.
Control of the directories used may be found in the first
few lines of the
.I Makefile
file and the other files written by the
.I configure
script;
it is best to reconfigure using the
.I configure
script, rather than attempting to do this by hand.
.br
.ne 1i
.SH GETTING HELP
If you need assistance with the
.I SRecord
package,
please do not hesitate to contact the author at
.RS
.ft CW
Peter Miller <millerp@canb.auug.org.au>
.ft R
.RE
Any and all feedback is welcome.
.PP
When reporting problems,
please include the version number
given by the
.RS
.ft CW
.nf
\f[B]% \fPsrec_cat -version
.if n \f[B]srecord version\fP \f[I]\*(V)\fP
.if t \f[CB]srecord version\fP \f[I]\*(V)\fP
\f[I]\&...warranty disclaimer...\fP
\f[B]%\fP
.fi
.ft R
.RE
command.
Please do not send this example;
run the program for the exact version number.
.br
.ne 2i
.SH COPYRIGHT
.I srecord
version \*(v)
.br
Copyright
.if n (C)
.if t \(co
\*(Y) Peter Miller
.PP
The
.I SRecord
package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
.PP
It should be in the
.I LICENSE
file included with this distribution.
.br
.ne 1i
.SH AUTHOR
.TS
tab(;);
l r l.
Peter Miller;E-Mail:;millerp@canb.auug.org.au
\f[CW]/\e/\e*\fP;WWW:;http://www.canb.auug.org.au/~millerp/
.TE