
Kraftsman(MUST_DO)           Khoros            Kraftsman(MUST_DO)

     MUST_DO

     This section explains what the user must manually do to com-
     pletely configure a new toolbox after kraftsman has been
     used to create a toolbox framework.  The "CREATE" operation
     sets up a minimal configuration.  You must follow the
     instructions below before kinstall will work properly.

     In this discussion, "{toolbox_name}" means the name of your
     new toolbox, and {toolbox_home} means the path to your tool-
     box.

     A source configuration file has been set up that will work
     for a basic toolbox.  This file will work "as is" if you do
     not need to support multiple architectures.  If this is not
     true, you should go inspect this file,
     {toolbox_home}/repos/config/src_conf/{toolbox_name}_mf
     and see Chapter 9 for special instructions.

     At this point, it is assumed that you have successfully
     created the basic toolbox source tree and configuration
     files.  Please continue:

     1.   kinstall needs a directory(s) in which it can install a
          program.  In  {toolbox_home}/src, you will need to
          create any directories that you might need - we suggest
          a Lib directory if you will be creating a new library
          for your new programs to call, and one directory for
          each program, named for that program.  In the case that
          you plan to add programs in different application
          domains, we recommend that you create a directory for
          each application domain, and then have the associated
          program directories located in the application domain
          directories.

          It is assumed that you will use kinstall to install the
          new routine into your toolbox.  You will need to follow
          this example to set up the toolbox source tree before
          kinstall can be used.

          Suppose the "vfrog" program is the first program to be
          installed into the new toolbox. And, you want
          "lvfrog.c" code to become part of a library.  The first
          thing to do is copy the "lvfrog.c" code into the
          library directory in the source tree. Next you must
          create an Imakefile and Makefile. The following com-
          mands will create the Imakefile and Makefile for you:

          % imkmf -name {library_name} -type lib -toolbox {toolbox_name}
          % makemake

          Where {library_name} is the name of the library and
          {toolbox_name} is the name of your toolbox. This must
          be done so that kinstall does not fail during the
          installation of the first routine.

          You must now tell the toolbox about your library.  In
          order to do this, run kraftsman, and select the "Confi-
          guration" pane, and enter {toolbox_name} in the space
          provided.  At this point, add your library name to the
          Toolbox Libraries field.

     2.   Now, your toolbox is ready for use.  Remember that any
          time you use any of the Khoros tools, such as imkmf,
          kinstall, ghostwriter etc, you MUST provide the name of
          your new toolbox.  To be on the safe side, any time you
          use a Khoros utility, consult the usage statement by
          using the [-U] argument.  If any utility lists [-
          toolbox] as an option - USE IT!

     3.   Once you have created your toolbox source tree,  you
          must create Imakefiles and Makefiles for the toolbox
          source tree.  This is done by using imkmf.  In
          {toolbox_home}/src, and in any application domain
          directories that you may have, execute:

          % imkmf -type dir -toolbox {toolbox_name}

          % makemake

          Note, makemake may give you the following errors:
          sh: syntax error at line 3: `;' unexpected
          make: Fatal error: Command failed for target `depend'

          You can ignore this error for now. It is caused because
          makemake wants to descend into all subdirectories, but
          no Imakefiles and Makefiles have yet been created in
          the subdirectories.  As you add programs and direc-
          tories, this error will no longer appear.

     4.   Develop your new programs in your work directory
          described in the former sections of this chapter.
          Don't forget to use the [-toolbox] option to ghost-
          writer.

     5.   If you are writing a vroutine, use kinstall to install
          your new program in your toolbox.  Don't forget to  use
          the [-toolbox] option.  If you are writing an xvrou-
          tine, you must install your new program by hand.
          Instructions for this were given earlier in this
          chapter.

     6.   Add the {toolbox_home}/bin directory to your path
          (either in your ".cshrc" file or in your ".login" file)
          so that you can access your new routine.

     DON'T FORGET ...

     1.   After setting up a toolbox and defining the bin direc-
          tory location, add this path to the toolbox bin direc-
          tory to your path. Modify your ".cshrc" or ".login"
          file and add the toolbox bin directory to your path.

     2.   If any other libraries are created in the toolbox and
          programs need to load against them, those libraries
          must be added to the imake definition file via
          kraftsman's configuration pane.

     3.   Any time the you modify the configuration of the imake
          definition file for the toolbox, you should do:
          % make Makefile Makefiles
          in the top level source directory of your toolbox to
          update all the Makefiles to take advantage of the
          changes.

     4.   When using the any of the Khoros tools to manage a
          toolbox, the [-toolbox] option MUST be specified.

          Copyright 1992, University of New Mexico. All rights
          reserved.

Khoros                    Release: 1.0                          1

