mkconfig
Introduction
mkexec is a program which creates an configuration file for a
program. It actually builds an assembler file (_s, input for as68) from an
input file (the file format is given below) which
describes the items which have to be made configurable and their type.
The output file conforms to the level 2 configuration specification.
Usage
mkconfig in-file out-file [channels]
- in-file
-
The name of the input file which has to be converted. The file will be
searched on the data default device (cfr DEVDataGet).
- out-file
-
The name of the output file. It will be put on the data default device if
a device name is not included (cfr DEVDataGet). If a file with the
same name already existed, it will be overwritten.
- channels
-
If some channels are also passed, then the last channel in the list will
be used to report the errors (so that they can be displayed in the output
channel for make.
It is best to include some lines in your makefile which will compile your
configuration info, e.g.
config_o : config_cf
mkconfig config_cf config_s
as68 config_s config_o
rm config_s
The file format is line oriented. The maximum line length is 120
characters. Empty lines and lines starting with a percentage sign or a
semicolon ('%' or ';') are discarded as comments.
Lines starting witha double quote ('"') are treated as the
description for the next configurable item. This description can be several
lines long (each starting with a double quote).
All other lines start with a keyword, followed by some space separated
parameters. If a parameter itself contains spaces, then it has to be included
in double quotes.
The first line of the file has to start with CONFIG, followed by
the program name and version.
Each configuration file can only contain 255 configurable items (including
skipped items). If you require more items, than you will have to use more than
one configuration file (each application can contain as many configuration
blocks as necessary).
To allow the configurarion program to update the configuration information,
all configurable items are given an id number. You have to help mkconfig a bit
to have a proper starting value for this seed (see ID
). However, these ID values have to be unique and should therefore be
registered (and confirmed to be free). TO register configuration id's, contact
Jochen Merz
Im Stillen Winkel 12
47169 Duisburg
GERMANY
tel : + 49 203/ 50 20 11
fax : + 49 203/ 50 20 12
mailbox : + 49 203/ 50 20 13
Anyway, the item id number depends on the order of the items in the input
file. Therefore you should never just change the order of the items in this
file, and use the (see SKIP) command to replace
items which are deleted.
Possible commands, meaning and parameters
- ID
- followed by a string. Only the first three letters
will be used as the top three bytes of the item id. The
bottom byte will be initialised to zero and incremented by
one for each of the following items. When the string does
not contain three characters, then local id's will be
generated (which are not remembered by the configuration
software).
- STRING
- for a configurable string. The parameters are the variable
name, the maximum length of the string and the default
value.
- FONT
- followed by variable name and default, for a configurable
fontname.
- DRIVER
- followed by variable name and default, for a configurable
PROforma printer driver name.
- DIRECTORY
- for a configurable directory where files have to be found.
The parameters are the variable name and default value.
- FILENAME
- for a configurable filename. The parameters are the
variable name and default value.
- SKIP
- This will generate a skipped item - which can be
important for backward compatibility with old config
blocks, to replace no longer used items and not replace the
id for that item by something else.
- BYTE
- followed by variable name, default, minimum and maximum
value. (These values are treated as unsigned).
(The variable will be of type char).
- SHORT
- followed by variable name, default, minimum and maximum
value. (These values are treated as unsigned).
- INT
- followed by variable name, default, minimum and maximum
value. (These values are treated as unsigned).
- SELECTION
- followed by name. The actual possibilities are displayed on
the following lines, which should start by one or more
spaces, then the code value (in the range 0..255) and then
the description (one word or between double quotes). The
list is ended by a comment or empty line.
PROGS, Professional & Graphical Software
last edited January 7, 1996