next up previous contents
Next: 1.4 Jam Up: 1 Standard Make Utilities Previous: 1.2 MMS

1.3 Imake

To handle larger software projects, the X11 window system, more comfortable imake[Bru95] was developed. It uses the C preprocessor to create a makefile from a small description file and global information. This global information has to be managed by a human. Since it uses make later on to build the targets, all constructs known by make can be used. The advantage of imake is that because of the use of a preprocessor high level rules can be implemented. This allows a much more compact definition of the dependences in an IMakefile as can be seen in Figure 1.3.

  figure824
Abbildung 1.3: Simple IMakefile for imake

The expansion of the macro names is done by make and not by the Cpp preprocessor. The higher-level rules, like the NormalLibraryTarget and the ComplexProgramTarget are defined using predefined make macros which are then expanded by make. Therefore it is difficult to create multiple targets of the same kind within one description file. Again using the same macro names with different definitions complicates the handling of large software projects. imake has rules to build multiple programs in the same directory but they require many parameters since there exist no default macros. The real dependence checking is done again by make. One particular problem is, that regenerating the makefile from IMakefiles has to be done by the developer and cannot be performed automatically. In addition during generation of the new description file all stored dependences are lost and must be regenerated again by automatically applying makedepend. imake has the same restrictions during checking dependences like make because it is only a preprocessing tool to generate makefile.

If subdirectories are needed within a project the SubDirs must be called within the IMakefile. This rule implicitly uses the make macro SUBDIRS which must be defined in the description file too. In this case all actions are done first in the specified subdirectories and then in the local subdirectory. This implies recursive invocations of the make utility during dependence checking and program generation.

It is quite easy to create new rules under imake because it is just using the Cpp preprocessor. A new rule definition file must be included into the IMakefile for automatic expansion.

One problem with imake is, that global information must be maintained by a developer and is not checked automatically. Usually the global information is split into two parts:

  1. The definition of rules as Cpp macros
  2. Filenames and definitions used by make as macro names

Since for the X11 Window System this information is stored globally, it is quite easy to compile new X11 programs using this installed version. But it is very difficult to extend the global information automatically if a project defines local additions. Usually no information is transferred into project installation.


next up previous contents
Next: 1.4 Jam Up: 1 Standard Make Utilities Previous: 1.2 MMS

IUE WWW server
Fri Jan 3 17:00:13 MET 1997