The hmake-config utility


Hmake-config is a small utility for managing your hmake configuration. It updates an hmakerc file by adding or deleting knowledge about a particular Haskell compiler, or changing the default compiler.

Usage

The basic option summary is:

    Usage: hmake-config [cfgfile] [add|delete|default] compiler
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.)

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.

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

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.

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.

I'd welcome any bug reports, or ideas for other options or behaviours you would find useful.


The latest updates to this software are available on the WWW from http://www.cs.york.ac.uk/fp/hmake/

Information last updated: 2002-01-21
York Functional Programming Group
Malcolm.Wallace@cs.york.ac.uk