Paul DuBois
dubois@primate.wisc.edu
Wisconsin Regional Primate Research Center
Version 1.01
Revision date: 1 May 1997
This document is the imake Frequently Asked Questions (FAQ)
list. It tries to answer some of the commonly-asked questions
about imake, a Makefile generator used for software
configuration.
This document is available in the imake-stuff archive,
which is located at:
http://www.primate.wisc.edu/software/imake-stuff/ ftp://ftp.primate.wisc.edu/software/imake-stuff/If you have comments about this FAQ or suggestions for material to be included, please send them to the FAQ maintainer, Paul DuBois, dubois@primate.wisc.edu. At the moment, this FAQ is very new and in great need of suggestions for improvement.
The Open Group 11 Cambridge Center Cambridge, MA 02142-1405 USA http://www.opengroup.org/imake is copyrighted by The Open Group, but is freely available and redistributable.
http://www.x.org/ ftp://ftp.x.org/There are also several mirror sites; a list is available in the GettingR6 file at the locations just shown.
If you don't want to get the X11 distribution, the imake-related
parts of X11 are packaged as the itools distribution, which
is available at:
http://www.primate.wisc.edu/software/imake-book/ ftp://ftp.primate.wisc.edu/software/imake-book/You should use the most recent version of imake you can. The current version is the one distributed with X11R6.3. However, you need an ANSI C compiler to build it. If you don't have one, you may be able to build the version distributed with X11R6.1. There is also an R6.1-based itools distribution.
Many of the freely-available UNIX variants (e.g., FreeBSD, Linux)
include imake in their standard distributions. Check the
distribution for an X developer's package, since imake
may not be installed if you install only the X server and X client
packages.
Similarly, XFree86 includes imake, but it won't be installed
unless you install the developer's part of the distribution.
Also recommended are makedepend, mkdirhier (if your
system doesn't support mkdir -p), and bsdinst
or install.sh (if your system doesn't have a BSD-compatible
install program).
All of these are available in the X11 or itools distributions.
http://www.primate.wisc.edu/software/imake-book/ ftp://ftp.primate.wisc.edu/software/imake-book/The archive includes the Preface from the book and two appendixes, one of which contains the itools installation instructions.
http://www.primate.wisc.edu/software/imake-stuff/ ftp://ftp.primate.wisc.edu/software/imake-stuff/
subscribe imake-talk
If the project is for an X program, try generating the Makefile
by running xmkmf. If that works, try make and make
install. If you don't have xmkmf, see "Where
can I get imake?"
If the program isn't an X program, then its documentation should
say something about how to bootstrap the Makefiles.
To regenerate the Makefile (e.g., after making a change
to the Imakefile), you can either run the bootstrapper
again, or else run this command:
% make MakefileIf the project has multiple directories, you'll need to generate the Makefiles in any subdirectories:
% make Makefiles
XCOMM this is a commentshould end up as:
# this is a commentThe XCOMM symbol is supposed to be translated to # during Makefile generation.
If translation fails and you see XCOMM symbols in your
Makefile, you're probably using a newer set of configuration
files (e.g., from X11R6 or later) that expect XCOMM to
be translated to # by imake and an older version
of imake (e.g., from X11R5 or before) that expects the
configuration files to handle the translation. The solution is
to upgrade to a version of imake from X11R6 or later.
#ifdef UseInstalled ...other stuff... MKDIRHIER = BourneShell $(BINDIR)/mkdirhier #else ...other stuff... MKDIRHIER = BourneShell $(SCRIPTSRC)/mkdirhier.sh #endifto this:
MKDIRHIER = mkdirhier #ifdef UseInstalled ...other stuff... #else ...other stuff... #endifAnother solution is to upgrade to a more recent set of configuration files, since this problem occurs with the X11R4 and X11R5 configuration files, but has been fixed in later X11 releases.
% imake -v -s/dev/null -f/dev/null -T/dev/nullIf your shell supports {...} expansion, the following command is equivalent but simpler to type:
% imake -v -{s,f,T}/dev/null
However, if you create Imakefile.c as a link to another
file before running imake, then that file will still exist
and contain the contents of Imakefile.c after imake
runs, even though Imakefile.c will have been removed. Then
you can look at the file to see what's in it.
You can use this trick with a sequence of commands such as the
following:
% touch fake % ln fake Imakefile.c % make Makefile (or xmkmf, imboot, etc.) % more fakeThis works by creating Imakefile.c as a link to a file fake before running imake. imake writes the contents of Imakefile.c, then removes it later, but since fake is a link to Imakefile.c, it remains in existence after imake runs and you can take a look at it.
Note that you'll need to re-run the ln command each time
you run imake to be able to see what gets written to Imakefile.c.