MKID
Section: User Commands (1)
Index
Return to Main Contents
NAME
mkid - make an id database
SYNOPSIS
mkid
[-v]
[-fout-file]
[-sdirectory]
[-rdirectory]
[-Sscanarg]
[-aarg-file]
[-]
[-u]
[files...]
DESCRIPTION
Mkid
builds a database that stores numbers and identifier names, as well
as the names of the files in which they occur.
Mkid
is particularly useful with large programs spread out across multiple
source files. It serves as an aid for program maintenance and as a
guide
for perusing a program.
The following options are recognized:
- -v
-
Verbose.
Report
mkid's
progress in building the database. The output comes on standard error.
- -fout-file
-
Write the finished database into
out-file.
ID
is the default.
- -sdirectory
-
- -rdirectory
-
If
mkid's
attempt to open a source-file fails, it will try to checkout the
corresponding SCCS or RCS file if present. The
-s
option tells
mkid
which directory holds the SCCS file.
Similarly, the
-r
option tells
mkid
which directory holds the RCS file.
If neither the RCS or SCCS directories are specified,
mkid
will first look for an SCCS file in the current directory, then in
sccs,
and finally in
SCCS.
It will then look for an RCS file in the current directory, and finally in
RCS.
- -aarg-file
-
Open and read
arg-file
in order to obtain a list of source file arguments. Source file names
must appear one to a line.
-S,
-r,
and
-s
arguments may also be placed one per line in
file.
They are distinguished from source file names by their leading `-'. If a file name begins
with `-', it can be distinguished from an argument by explicitly prepending the current
directory string: `./'.
- -
-
This operates in the same manner as the
-a
option described above, but reads from the standard input instead of a file.
- -u
-
Update an existing database. Only those files that have been modified
since the database was built will be rescanned. This is a significant
time-saver for updating large databases where few sources have changed.
- files...
-
If neither the
-a,
-,
nor
-u,
arguments have been specified, take file names from the command line.
- -Sscanarg
-
Mkid
scans source files in order to obtain numbers and identifier names.
Since the lexical rules of languages differ,
mkid
applies a different scanning function to each language in order
to conform to that language's lexical rules.
Mkid
determines the source file's language by examining its filename
suffix which commonly occurs after a dot (`.').
The
-S
argument is a way of passing language specific arguments to the
scanner for that language. This argument takes a number of forms:
-S<suffix>=<language>
-S<language>-<arg>
+S-<arg>
The first form associates a suffix with a language. You may find
out which suffixes are defined for which languages with the following
options: `-S<suffix>=?' tells which language is bound to
<suffix>,
`-S?=<language>' tells which suffixes are bound to
<language>,
and `-S?=?' reports all bindings between suffixes and languages.
The second form passes an argument for processing by the scanner
for a specific language. The third form passes an argument to
all scanners.
You may get a brief summary of the scanner-specific options for a
language by supplying the following option: `-S<language>?'.
Here is a brief summary of the options for the
`asm'
(assembler) language.
The
-u
option controls whether or not the assembler scanner should strip
off a leading
underscore
(`_') character. If your assembler prepends an
underscore
to external symbols, then you should tell the scanner to strip it
off, so that references to the same symbol from assembly and from
a high-level language will look the same.
The
-c<cc>
option supplies the character(s) used to begin a comment that extends
to the end of the line.
The
-a<cc>
option indicates character(s) that are legal in names, in addition to
the alpha-numeric characters. If the option appears as `-a', names
that contain these characters are ignored. If it appears as `+a', these
names are added to the database.
BUGS
This manual page needs to be more complete about the scanner-specific
arguments.
At the moment, the only scanners implemented are for C and assembly
language. There ought to be scanners for Ada, Pascal, Fortran, Lisp,
nroff/troff, and TeX.
SEE ALSO
lid(1).
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- BUGS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 23:37:41 GMT, January 02, 2023