




































































imake(1)                     Khoros                      imake(1)



PPPPRRRROOOOGGGGRRRRAAAAMMMM
     imake - C preprocessor interface to the make utility

SSSSYYYYNNNNTTTTAAAAXXXX
     imake

     [-D]           used to set directory-specific variables

     [-I]           used to indicate the directory in which the
                    _i_m_a_k_e template and configuration files may be
                    found

     [-T]           specifies the name of the master template
                    file

     [-f]           specifies the name of the pre-directory input
                    file

     [-s]           specifies the name of the _m_a_k_e description
                    file

     [-e]           the _i_m_a_k_e should execute the generated
                    _M_a_k_e_f_i_l_e

     [-v]           vebose mode, print the _c_p_p command line

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     _I_m_a_k_e is used to generate _M_a_k_e_f_i_l_e_s from a template, a set
     of _c_p_p macro functions, and a per-directory input file
     called an _I_m_a_k_e_f_i_l_e.  This allows machine dependencies (such
     has compiler options, alternate command names, and special
     _m_a_k_e rules) to be kept separate from the descriptions of the
     various items to be built.


     _H_O_W _I_T _W_O_R_K_S

     _I_m_a_k_e invokes _c_p_p with any -_I or -_D flags passed on the com-
     mand line and passes it the following 3 lines:

               #define IMAKE_TEMPLATE "KHOROS.tmpl"
               #define INCLUDE_IMAKEFILE "Imakefile"
               #include IMAKE_TEMPLATE

     where _K_h_o_r_o_s._t_m_p_l and _I_m_a_k_e_f_i_l_e may be overridden by the -_T
     and -_f command options, respectively.  If the _I_m_a_k_e_f_i_l_e con-
     tains any lines beginning with a '#' character that is not
     followed by a _c_p_p directive (####iiiinnnncccclllluuuuddddeeee, ####ddddeeeeffffiiiinnnneeee, ####uuuunnnnddddeeeeffff,
     ####iiiiffffddddeeeeffff, ####eeeellllsssseeee, ####eeeennnnddddiiiiffff, or ####iiiiffff), _i_m_a_k_e will make a temporary
     _m_a_k_e_f_i_l_e in which the '#' lines are prepended with the
     string ``/**/'' (so that _c_p_p will copy the line into the
     _M_a_k_e_f_i_l_e as a comment).



Khoros                    Release: 1.0                          1






imake(1)                     Khoros                      imake(1)



     The _I_m_a_k_e_f_i_l_e reads in file containing machine-dependent
     parameters (specified as _c_p_p symbols), a site-specific
     parameters file, a file containing _c_p_p macro functions for
     generating _m_a_k_e rules, and finally the _I_m_a_k_e_f_i_l_e (specified
     by INCLUDE_IMAKEFILE) in the current directory.  The
     _I_m_a_k_e_f_i_l_e uses the macro functions to indicate what targets
     should be built; _i_m_a_k_e takes care of generating the
     appropriate rules.

     The rules file, _K_h_o_r_o_s._r_u_l_e_s, in the configuration directory
     contains a variety of _c_p_p macro functions that are config-
     ured according to the current platform.  _I_m_a_k_e replaces any
     occurrences of the string ``@@'' with a newline to allow
     macros that generate more than one line of _m_a_k_e rules. For
     example, the macro

     #define program_target(program, objlist)          @@\
     program:        objlist                           @@\
             $(CC) -o $@ objlist $(LDFLAGS)

     when called with _p_r_o_g_r_a_m__t_a_r_g_e_t(_f_o_o, _f_o_o_1._o _f_o_o_2._o) will
     expand to

     foo:    foo1.o foo2.o
             $(CC) -o $@ foo1.o foo2.o $(LDFLAGS)


     On systems whose _c_p_p reduces multiple tabs and spaces to a
     single space, _i_m_a_k_e attempts to put back any necessary tabs
     (_m_a_k_e is very picky about the difference between tabs and
     spaces).  For this reason, colons (:) in command lines must
     be preceded by a backslash (\).


     _U_S_E _W_I_T_H _K_H_O_R_O_S

     The Khoros System uses _i_m_a_k_e extensively, for both develop-
     ment and distribution. Two utilities that are used exten-
     sively in Khoros to maintain the _i_m_a_k_e system are _m_a_k_-
     _e_m_a_k_e(_1) and _i_m_k_m_f(_1). _m_a_k_e_m_a_k_e(_1) is a shell script that
     calls _i_m_a_k_e with the necessary flags to build a _M_a_k_e_f_i_l_e.
     _i_m_k_m_f(_1) will automatically generate an _I_m_a_k_e_f_i_l_e.

RRRREEEEQQQQUUUUIIIIRRRREEEEDDDD AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
     none

OOOOPPPPTTTTIIIIOOOONNNNAAAALLLL AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
     ----DDDD_d_e_f_i_n_e
             This option is passed directly to _c_p_p.  It is typi-
             cally used to set directory-specific variables.  For
             example, the Khoros uses this flag to set _T_O_P to the
             name of the directory containing the Khoros source



Khoros                    Release: 1.0                          2






imake(1)                     Khoros                      imake(1)



             and _C_U_R_D_I_R to the name of the current directory,
             relative to the _T_O_P directory.

     ----IIII_d_i_r_e_c_t_o_r_y
             This option is passed directly to _c_p_p.  It is typi-
             cally used to indicate the directory in which the
             _i_m_a_k_e template and configuration files may be found.

     ----TTTT_t_e_m_p_l_a_t_e
             This option specifies the name of the master tem-
             plate file (which is usually located in the direc-
             tory specified with -_I) used by _c_p_p.  The default is
             _K_h_o_r_o_s._t_m_p_l.

     ----ffff _f_i_l_e_n_a_m_e
             This option specifies the name of the per-directory
             input file.  The default is _I_m_a_k_e_f_i_l_e.

     ----ssss _f_i_l_e_n_a_m_e
             This option specifies the name of the _m_a_k_e descrip-
             tion file to be generated but _m_a_k_e should not be
             invoked.  If the _f_i_l_e_n_a_m_e is a dash (-), the output
             is written to _s_t_d_o_u_t.  The default is to generate,
             but not execute, a _M_a_k_e_f_i_l_e.

     ----eeee      This option indicates the _i_m_a_k_e should execute the
             generated _M_a_k_e_f_i_l_e.  The default is to leave this to
             the user.

     ----vvvv      This option indicates that _i_m_a_k_e should print the
             _c_p_p command line that it is using to generate the
             _M_a_k_e_f_i_l_e.

FFFFIIIILLLLEEEESSSS
     KHOROS_HOME/repos/config/imake_conf/Site.def
     KHOROS_HOME/repos/config/imake_conf/Library.def
     KHOROS_HOME/repos/config/imake_conf/Khoros.tmpl
     KHOROS_HOME/repos/config/imake_conf/Khoros.rules
     KHOROS_HOME/repos/config/imake_conf/_p_l_a_t_f_o_r_m._c_f
     /usr/tmp/tmp-imake._n_n_n_n_n_n     temporary input file for cpp
     /usr/tmp/tmp-make._n_n_n_n_n_n      temporary input file for make
     /lib/cpp or /usr/lib/cpp      default C preprocessor

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     make(1), makemake(1), imkmf(1), makedepend(1)

     S. I. Feldman _M_a_k_e - _A _P_r_o_g_r_a_m _f_o_r _M_a_i_n_t_a_i_n_i_n_g _C_o_m_p_u_t_e_r _P_r_o_-
     _g_r_a_m_s

     Khoros Manual, Vol 2, Chapter 9 - Configuration Management





Khoros                    Release: 1.0                          3






imake(1)                     Khoros                      imake(1)



EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
     The following environment variables may be set, however
     their use is not recommended as they introduce dependencies
     that are not readily apparent when _i_m_a_k_e is run:

     IIIIMMMMAAAAKKKKEEEEIIIINNNNCCCCLLLLUUUUDDDDEEEE
          If defined, this should be a valid include argument for
          the C preprocessor.  E.g. ``-I/usr/include/local''.
          Actually, any valid _c_p_p argument will work here.

     IIIIMMMMAAAAKKKKEEEECCCCPPPPPPPP
          If defined, this should be a valid path to a preproces-
          sor program.  E.g. ``/usr/local/cpp''.  By default,
          _i_m_a_k_e will use /lib/cpp.

     IIIIMMMMAAAAKKKKEEEEMMMMAAAAKKKKEEEE
          If defined, this should be a valid path to a make pro-
          gram.  E.g. ``/usr/local/make''.  By default, _i_m_a_k_e
          will use whatever _m_a_k_e program is found using
          _e_x_e_c_v_p(_3).

RRRREEEESSSSTTTTRRRRIIIICCCCTTTTIIIIOOOONNNNSSSS
     Comments should be preceded by ``/**/#'' to protect them
     from _c_p_p.

AAAAUUUUTTTTHHHHOOOORRRR
     Original document written by:
     Todd Brunhoff, Tektronix and MIT Project Athena; Jim Fulton,
     MIT X Consortium


























Khoros                    Release: 1.0                          4



