The hmake-config utility
Usage
Viewing the compiler database
Updating the compiler database
Hmake-config is a small utility for managing your hmake
compiler database. It can show a summary of which compilers are known,
or it can update the database (held in an hmakerc file)
by adding or deleting knowledge about a particular Haskell compiler,
or changing the default compiler.
The basic option summary is:
Usage: hmake-config [cfgfile] list
hmake-config [cfgfile] [add|delete|default] compiler
The cfgfile holds the database of known compilers.
The specification of a cfgfile is optional - if it is
not given, the file $HOME/.hmakerc/$MACHINE is assumed.
(If you use a non-standard location for the hmakerc file, you will
also need to tell hmake where it is on every invocation.)
If the config file does not yet exist, it is created by copying
the system-wide configuration from your machine's installation of
hmake. (Usually in /usr/local/lib/$MACHINE/hmakerc,
where $MACHINE is the machine architecture as reported by
`harch`, not the actual machine name.)
Viewing the compiler database
list
|
All compilers known by hmake are listed, one
per line. The default compiler is also shown.
|
For instance:
$ hmake-config list
Config file is:
/usr/malcolm/.hmakerc/ix86-Linux
Known compilers:
nhc98 (v1.14)
hbc (0.9999.5b,)
ghc-4.08.2 (4.08.2)
ghc-5.02.2 (5.02.2)
ghc (5.02.2)
/usr/local/bin/nhc98 (v1.14)
/usr/local/bin/hbc (0.9999.5b,)
/usr/local/bin/ghc (5.02.2)
Default compiler:
nhc98
The hmakerc file manipulated by hmake-config is written in
plain text, as a structured Haskell value. You are free to read it,
and edit it by hand if you wish. Be aware however that a later use
of hmake-config with the action add may override
any changes you make.
Updating the compiler database
One of the actions add, delete, or default
is applied to the compiler given on the commandline. (If no
action is given, add is assumed.) The compiler
can be specified either as a simple name which resolves to an
executable command name via the normal $PATH mechanism,
or as an absolute pathname to the compiler (these are treated as
different database entries).
add
|
The specified compiler is probed for various pieces of
information, including its version, and the paths to
directories holding interface files for standard libraries.
If everything is OK, that compiler's configuration is added
to the hmakerc file, or if it was already known, the
configuration is updated. |
delete |
All configuration information for the specified compiler is
removed from the hmakerc file. |
default |
Provided the specified compiler is already known in the
hmakerc file, it is made the default compiler. If it is not
known, the default remains unchanged and an error is reported.
|
Notes
To support users who may have access to heterogeneous machines on a
network with a shared filespace, there is a separate hmakerc
file for each machine architecture they use. This is very important
to avoid conflicts between versions of compilers.
It is difficult to detect the exact directories in which
hbc expects to find interface files for standard libraries.
Thus hmake-config relies on the environment variables
HBCDIR or LMLDIR for the correct location.
The latest updates to this software are available on the WWW from
http://www.haskell.org/hmake/
(
http://www.cs.york.ac.uk/fp/hmake/)
Information last updated: 2002-08-09
York Functional Programming Group
Malcolm.Wallace@cs.york.ac.uk
|