File: INSTALL

package info (click to toggle)
ftnchek 2.11.2-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,392 kB
  • ctags: 2,790
  • sloc: ansic: 21,570; fortran: 2,921; yacc: 2,794; sh: 1,623; makefile: 693; lisp: 264; awk: 163
file content (281 lines) | stat: -rw-r--r-- 11,516 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
			  INSTALLING FTNCHEK

To install ftnchek, follow the instructions below for your operating
system.  If you wish, you may refer to the README file, in the section
``CUSTOMIZING'' for options that allow compiling with bigger table
sizes or accepting/rejecting certain syntax extensions.  However, the
default compilation options are generally satisfactory.


(1) UNIX and UNIX-like systems

Configure a Makefile for your system with the command:

        $ ./configure

This uses the file Makefile.in as a template.  If you want to change
some options, edit the file Makefile.in, not Makefile, and re-run
configure.

Next, build ftnchek with the command:

	$ make

If you wish the ftnpp preprocessor to be built, say

        $ make ftnpp

To verify correct operation of the newly created ftnchek, you can
now issue the command

	$ make check

This will run ftnchek on the suite of test programs in the
subdirectory ``test'' and report on any discrepancies.

Once ftnchek is working properly, issue the command (requiring
super-user authority):

	$ make install

This will install the executable in /usr/local/bin and the manpage in
/usr/local/man by default.  (The dcl2inc program will also be
installed as well as ftnpp if it was built.)  If you do not wish to
install the manpages but only the executables, use instead

	$ make install-exe

If you see a warning about "catman:" on IRIX the manpage gets
specialized treatment, since man pages are pre-formatted and packed,
and nroff is not bundled with the OS.  If nroff is available, then it
is used to create the formatted man pages, and all is well.
Otherwise, the user should obtain the ftnchek "catman" file,
distributed separately.  (It is available from ftp.dsm.fordham.edu in
the pub/ftnchek directory).  Unpack this in the source directory and
proceed with "make install".  If the "catman" files are not found, a
notice will be issued, and the flat ascii ("doc") versions will be
used.


(2a) VMS on DEC VAX

   Give the command

        $ @BUILD

   After the program has been compiled, you must turn it into a
   so-called "DCL foreign command" so that it can be invoked by
   giving its name on a command line, instead of using the RUN
   command.  Do this with the command

        $ FTNCHEK :== $disk:[directory]FTNCHEK

   where you substitute the disk and directory names where the file
   FTNCHEK.EXE resides.  This command must be executed once per
   login.  It is suggested you put this command into your LOGIN.COM
   file.

   The BUILD procedure also creates a VMS help library named
   FTNCHEK.HLB.  To access it from the VMS HELP command, you must
   give the command

        $ DEFINE HLP$LIBRARY disk:[directory]FTNCHEK.HLB"

   Again, this command must be executed once per login to have effect.

   Note that BUILD.COM uses the files CC.COM and LINK.COM which are
   conditional compilation and link scripts that allow re-making
   ftnchek by compiling only what has changed.

   Also note that SHELL_MUNG.C, which provides expansion of
   command-line wildcards, is no longer bundled with the ftnchek
   distribution, but is obtainable separately at the ftnchek home page
   and elsewhere.  You should obtain this file before building
   ftnchek.  The build will succeed without it, but the resulting
   executable will not expand wildcards.

(2b) VMS on DEC ALPHA

   Same as (2a) except use BUILD-ALPHA.COM instead.


(3a) MS-DOS with Borland C

   Rename the file "makefile.bc" to "makefile" and then give the
   command:

        C> MAKE

   Note: This makefile has not been updated lately and may not work
   with recent releases of Borland C.  I only have an old version of
   this compiler.  Also, ftnchek after version 2.7 has a large appetite for
   dynamically allocated memory.  This means that 16-bit 80x86 code,
   which is limited to 64KB data segments, will soon run out of memory
   when analyzing moderate-sized programs.  Therefore it is best to
   compile ftnchek to 32-bit code.  I hear that Borland C now supports
   32-bit code, but I have not been able to update the makefile to
   take advantage of it.  I would welcome the contribution of an
   updated version of makefile.bc.


(3b) MS-DOS with DJGPP

   Rename the file "makefile.djgpp" to "makefile".  Edit the line

         prefix          = ${DJGPP_ROOT}

   to define the top directory where things are to be installed, e.g.

         prefix          = D:/DJGPP

   Then give the command

        C> MAKE

   Note: the pathname must be defined with forward slashes, not
   backslashes, since it will be seen as a string by the C compiler.
   (If you insist on having backslashes, use a double backslash for
   every single backslash in the path, e.g. D:\\DJGPP.)

(4) Macintosh Programmer's Workshop (MPW)

   Rename the file "makefile.mpw" to "makefile".  Edit the file,
   changing character '+' to CHAR(182), option-d on the Macintosh
   keyboard; and the character '/' to CHAR(196), option-f.  Then
   use the "make" command to create Ftnchek.


(5) OS/2 with gcc

   Rename the file "makefile.os2" to "makefile" and then run make.

   If you have installed the GNU utility "sed", you can customize the
   makefile for your system.  Give the command:

         configure_os2

   This will create a new version of makefile.os2 with appropriate
   values for your system.  You should rename it "makefile" and then
   run make.  Configure_os2 also builds an OS/2 version of the dcl2inc
   script that is configured for your system.  Many thanks to Jan
   Ftacnik, Stefan A. Deutscher and Christian Bartels for producing
   and improving this configuration script.

(6a) Other systems having "make" utility

   Rename the file "makefile.generic" to "makefile", edit it
   appropriately for your system, and run make.


(6b) Other systems not having "make" utility

   It should suffice simply to compile all the ".c" files and link
   them.  The only differences among the versions for different
   operating systems have to do with:

         -- the use of "/" vs. "-" as a command-line option prefix.
            Define the macro name OPTION_PREFIX_SLASH if "/" is to be
            accepted as an alternate to "-".  (No particular value
            need be assigned to this macro, just define it.)  The "-"
            prefix is always accepted.  NOTE: do not define this macro
            if your system uses the "/" character as a separator in
            path names.  Doing so will introduce ambiguities in the
            command-line arguments.
         -- the default filename extension ".for" vs. ".f".  Define
            the macro name DEF_SRC_EXTENSION to the string value
            corresponding to Fortran source files on your system.
         -- the default home directory in which to search for
            .ftnchekrc or ftnchek.ini.  Define SPECIAL_HOMEDIR to the
            string value appropriate for your system.
         -- the default systemwide directory in which to search for
            include-files.  Define the macro DEFAULT_INCLUDE_DIR to
            the string value of this directory.
   These macros are all defined automatically to appropriate values
   for Unix, VMS, and MSDOS systems.  You only need to define them by
   hand if compiling ftnchek on other systems.

   If your compiler does not accept modern C syntax for function
   prototypes, define the macro NO_PROTOTYPES.


Once ftnchek is working, you can test it by giving the command:

        $ ftnchek -list -sym average

Then compare the output against the file ``average.out''.  A more
thorough checkout is possible on Unix systems by giving the ``make
check'' command described above.


			   Associated files

There are several auxiliary files included in the distribution.  Most
of them are automatically installed by ``make install'' on a Unix
system.  On non-Unix systems, you may not be able to use them.  If you
can use them, you will need to install them in an appropriate place
manually.

dcl2inc is a script to convert the .dcl files produced by ftnchek with
    the -makedcls option, into files suitable for inclusion in your
    source code.  This script requires a modern version of awk.  The
    dcl2inc script itself is a Bourne shell script that simply invokes
    awk with suitable arguments.  On Unix systems, the dcl2inc script
    is generated from dcl2inc.in by the configure script, which
    substitutes apropriate values for the library where dcl2inc.awk is
    installed and for the local version of awk (e.g. gawk or nawk).
    If you wish to use this script on a non-Unix system, you can make
    the substitutions by hand, since they are few and obvious
    (assuming you have a suitable awk available).

ftnchek.el is an Emacs lisp package that provides an ftnchek mode.
    Using ``make install'' installs this in the system site-lisp
    directory if there is one.  Read the comments at the head of the
    file for details.  Each user should add a line like:
      (add-hook 'fortran-mode-hook (require 'ftnchek-mode "ftnchek"))
    to his or her personal .emacs file.  The author has said that this
    package is still undergoing improvements, so the version included
    in this distribution may well be out of date by now.  The most
    recent version of ftnchek.el can be found at the URL given in that
    file.

ftnchek.1 and dcl2inc.1 are Unix man pages.  They are automatically
    installed in the man directory by ``make install.''  They are not
    much use on non-Unix systems.

ftnchek.hlp is a VMS help document.  It is automatically converted to
    a help library by BUILD.COM.  That script gives instructions for
    making the help library available to VMS HELP.  You may wish to
    install this in a suitable system-wide help directory.

html is a directory containing a hypertext version of the
    documentation.  This is NOT installed automatically by ``make
    install.''  If you wish to make this documentation available on
    your local system, install these files someplace where a browser
    can access them.  A typical way to do this would be to create a
    directory named "ftnchek" in a suitable place in the web server
    directory, then copy all the files from the html directory to that
    directory.  Be aware that two files in this directory, namely
    index.html and sect1.html, are symbolic links to sect0.html.  On
    operating systems that do not support symbolic links, you will
    need to copy the file sect0.html to these file names.  Also, the
    html documents contain some URL's to other man pages.  If you have
    a cgi program that converts man pages to html on the fly, you may
    want to edit these links to invoke that cgi program correctly.  As
    distributed, the html files contain URL's of the form:
    "http://localhost/cgi-bin/man2html?prog&n" for prog(n).


				Notes

The suffix .prj for project files is also used by the program revision
control system prcs (see http://scam.xcf.berkeley.edu/~jmacd/prcs.html) so
that conflicts might occur.  Use the macro DEF_PROJ_EXTENSION to change the
default suffix.  For Unix systems, you can specify the alternative
extension on the make command line.  For example, to change the extension
to .foo you would say:
    make OPTIONS='-DDEF_PROJ_EXTENSION=\".foo\"'
Alternatively, edit the Makefile to set the OPTIONS variable as above,
or edit the file ftnchek.h to change the definition of DEF_PROJ_EXTENSION
to the desired string.

More details about customizing ftnchek are given in the README file.