BOOTSTRAP commands


PROGRAM NAME

kgenimake - Create or update Imakefile according to directory contents

DESCRIPTION

This program creates an Imakefile, assuming one does not already exist, or updates an already existing one to contain information sufficient to make the files contained in the directory. If an Imakefile does not exist, kgenimake copies a template, specified on the command line with [-type], into the current directory and then proceeds to update it. If the [-tb] option is specified with the name of a valid toolbox, the resulting Imakefile will contain the project include file for that toolbox. If the [-tb] option is not specified, the current toolbox's Imakefile is used. Updating is accomplished by looking at the names of all the files in the current directory and updating any existing "definition" that kgenimake knows about.

kgenimake uses the following templates that can be found in $BOOTSTRAP/repos/config/imake_config/Templates/:

Imakefile.library Library template file

Imakefile.kroutine Program template file

Imakefile.xvroutine X11 Program template file

Imakefile.dir Directory template file

Imakefile.csh Csh Script template file

Imakefile.sh Sh Script template file

Imakefile.ksh Ksh Script template file

Imakefile.perl Perl Script template file

Imakefile.example Example Program template file

Imakefile.xexample X11 Example Program template file

Imakefile.testsuite Testsuite Program template file

Imakefile.pane Pane Object template file

Since additional explanation of some of the arguments may be helpful, these are as follows:

type: If the Imakefile does not exist, this option is required and specifies which of the templates to use (see FILES below). There are five (5) known types:

1) library
This option uses the library template which will create an Imakefile which will make, and optionally install, a library of the name specified with the -name option.

2) dir
This option uses the directory template which will create an Imakefile that knows about subdirectories and will `cd' into them one at a time to continue the make.

3) script (csh, sh, ksh, perl)
This option uses the script template which will create an Imakefile that knows about shell scripts and how to install them correctly.

4) kroutine
This option uses the program template which will create an Imakefile which will make, and optionally install, a general, non-X11 program of the name specified with the -name option.

5) xvroutine
This option uses the X11 program template which will create an Imakefile which will make,and optionally install, a program of the name specified with the -name option that uses the X11 libraries.

6) fkroutine
This option uses the program template which will create an Imakefile which will make, and optionally install, a general, non-X11 program that depends on FORTRAN of the name specified with the -name option.

7) fxvroutine
This option uses the X11 program template which will create an Imakefile which will make,and optionally install, a program of the name specified with the -name option that uses the X11 libraries and depends on FORTRAN.

toolbox: This option is only used when an Imakefile does not exist. The toolbox option specifies the toolbox that the routine is associated with. Valid toolboxes can be listed using "craftsman". The resulting Imakefile will contain a "#include" for the toolbox project file. The toolbox project file must be located in $TOOLBOX_NAME/repos/config/imake_conf and called $TOOLBOX_NAME.def. If the toolbox option is not specified then the resulting Imakefile will contain "#include <Toolbox.def>" which is the default. This file is located in KHOROS_HOME/repos/config/imake_conf and is intended only for those who are working directly in Khoros source.

name: This option is only used when an Imakefile does not exist and the type, specified with the -type option, is one of: lib, prog or xprog. If the type is `lib', then this option specifies the name of the library which gets created (see examples). If the type is `prog' or `xprog', then this option specifies the name of the program that gets created.

output file: This option allow the user to specify an alternate output file to use other than the default file of `Imakefile'.

KNOWN FIELDS:

TOOLBOX This field contains the name of the toolbox so that the Imakefile can be regenerated automatically.

SUBDIRS This field is used in the "directory" template and specifies all subdirectories found in the current directory.

SRCS This field is used in the "library", "program", and "X program" templates to specify sources, not including FORTRAN sources (see below), which exist in the current directory. Sources currently consist of files with the following suffixes: '.c', '.y' and '.l'.

OBJS This field is used in the "library", "program", and "X program" templates to specify resulting objects, not including FORTRAN objects (see below). Entries in this field are created by changing the suffix on the files specified in SRCS to a '.o'.

FSRCS This field is used in the "library" template to specify FORTRAN sources which exist in the current directory. FORTRAN source is considered separately because the other sources, which all produce C code, can be created for use in shared libraries whereas FORTRAN source can not (this is true depending on the machine and version of f77 you have).

FOBJS This field is used in the "library" template to specify FORTRAN objects only. Entries in this field are created by changing the suffix on the files specified in FSRCS to a '.o'.

HEADERS This field is used in the "library", "program", and "X program" templates to specify include files, files with a '.h' suffix, which exist in the current directory.

SCRIPTS This field is used in the "scripts" template to specify script files, files with a '.csh' suffix, which exist in the current directory.

LIBRARY_NAME This field is used in the "library" template to specify the name of the resultant library. This field gets defined with the name specified with the "-name" argument.

PROGRAM_NAME This field is used in the "program" and "X program" templates to specify the name of the resultant programs. This field gets defined with the name specified with the "-name" argument.

SCRIPT_NAME This field is used in the "library" template to specify the name of the directory in which shell scripts sit. This field gets defined with the name specified with the "-name" argument.

REQUIRED ARGUMENTS

none

OPTIONAL ARGUMENTS

-tb
type: string
desc: Toolbox name
default: {none}
-recreate
type: flag
desc: Recreate Imakefile from template

Mutually Exclusive Group; if desired, specify ONE of:

-oname
type: string
desc: The object name
default: {none}
OR
-dir
type: flag
desc: create directory imakefile
OR
-mdir
type: flag
desc: create manual directory imakefile
OR
-example
type: flag
desc: create example imakefile
OR
-manual
type: flag
desc: create manual imakefile
OR
-xexample
type: flag
desc: create X11 example imakefile
OR
-mindex
type: flag
desc: create manual index Imakefile
OR
-testsuite
type: flag
desc: create testsuite imakefile
OR
-mglossary
type: flag
desc: create manual glossary Imakefile

EXAMPLES

SEE ALSO

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.