BUILDING IMAKE, CPP, and MAKEDEPEND _M_i_c_h_a_e_l _L_i_t_z_k_o_w Computer Sciences Department University of Wisconsin - Madison mike@cs.wisc.edu _1. _I_N_T_R_O_D_U_C_T_I_O_N _I_m_a_k_e, _c_p_p, and _m_a_k_e_d_e_p_e_n_d are not part of _c_o_n_d_o_r, but you will need correctly working copies of all three to build _c_o_n_d_o_r. _I_m_a_k_e is a program for building "Makefiles" which are customized for a particular set of hardware, software, and local environment. _I_m_a_k_e accom- plishes much of this task by using _c_p_p to expand macros. Since _i_m_a_k_e makes certain assumptions about the operation of _c_p_p which will not be true in all installations, it may be necessary to build a customized _c_p_p for _i_m_a_k_e'_s use. _M_a_k_e_d_e_p_e_n_d is a program for generating dependencies in "Makefiles" for C programs which include header files. Since some versions of _m_a_k_e_d_e_p_e_n_d do not parse certain _c_p_p directives correctly, you may need the version included here even if you already have _m_a_k_e_d_e_p_e_n_d. All three of these programs are included in the _X_1_1 dis- tribution, and are available from MIT. If you already have X11, you should already have these programs avail- able. They are included here for your convenience in the event you do not have X11. Instructions for building these programs are included in the X11 distribution, but those instructions assume you want to build the whole distribution. These instructions are intended to be a "direct path" to building just these three programs. The _c_o_n_d_o_r developers assume no responsibility for their com- pleteness, correctness, etc. _2. _B_U_I_L_D_I_N_G _I_M_A_K_E (1) cd to "imake" VVVVeeeerrrrssssiiiioooonnnn 4444....1111bbbb 2222////22228888////99992222 VVVVeeeerrrrssssiiiioooonnnn 4444....1111bbbb 2222////22228888////99992222 (2) To build correct Makefiles, _i_m_a_k_e must determine which platform, (both hardware and variant of UNIX), it is running on. It depends on certain unique strings being defined by your local version of _c_p_p to do this. If your local _c_p_p does not define the strings which _i_m_a_k_e expects, you can build a custom version of _i_m_a_k_e which will pass those strings to _c_p_p by using "-D" on the command line. Some hardware platforms are unique enough that the unix variation is implicit. In other cases two strings are used. Determine whether your local _c_p_p defines the necessary strings to identify your platform. The expected strings are as follows: ______________________________________________________ _|_S__t__r__i__n__g__(__s__)____________________________P__l__a__t__f__o__r__m________________________________________________| |"RiscAIX" IBM R6000 running AIX3.1 | |"mips" & "ultrix" DecStation running ULTRIX 4.0 | |"sun" & "mc68020" SUN 3 running SunOS 4.1+ | |"sun" & "sparc" SUN 4 running SunOS 4.1+ | |"mc68000" & "hp300" HP Bobcat running BSD 4.3 | |"vax" & "ultrix" Vax running Ultrix 3.2 | |"i386" & "sequent" Sequent Symmetry running Dynix | |"ibm032" IBM RT running BSD 4.3 | _|_____________________________________________________| (3) If you need to customize your _i_m_a_k_e to pass such strings to _c_p_p: a. To "Makefile.ini" add "-D" to the CFLAGS macro, where is replaced by any reasonable name for your platform. b. To "imakemdep.h" in the "cpp_argv" definition, add #ifdef "-D", #endif where matches the definition you added to "Makefile.ini" and matches the appropriate string(s) listed in the above table. Note, if two identifiers are listed above, you will have to add two lines here. (4) On AIX 3.1.5 platforms, you will also need to add "_BSD" to the CFLAGS macro in "Makefile.ini". XXXX11111111 TTTTOOOOOOOOLLLLSSSS 2222 VVVVeeeerrrrssssiiiioooonnnn 4444....1111bbbb 2222////22228888////99992222 (5) Compile _i_m_a_k_e by running "make -f Makefile.ini". _3. _B_U_I_L_D_I_N_G _C_P_P (1) Some versions of _c_p_p will not accept "/**/" as a zero length separator. This will cause constructs like /**/# Makefile comment line to be flagged as errors. If this is the case with your _c_p_p, you will need to build a special version to use with _i_m_a_k_e. Just try running such a line through your local version of _c_p_p to determine whether you have the problem. (2) If you do need the special _c_p_p, go into the _c_p_p directory and build it. Hopefully no customiza- tion will be needed. _4. _M_A_K_E_D_E_P_E_N_D (1) You will also need a correctly working version of "makedepend". This program reads a set of source files along with the flags which will be given to the C compiler when those sources are compiled and generates a set of dependence lines to be added to the local Makefile. There are some versions of this program around which incorrectly process lines of the form: #if Since condor uses this construct extensively to include the correct header files for different platforms, you will need a correctly working ver- sion. A shell script version called "mdepend.sh" is included here. It is much slower that the com- piled version, but should work correctly. XXXX11111111 TTTTOOOOOOOOLLLLSSSS 3333