mio - Make Is Ok for multiple architectures, especially for Basis codes.


mio [-g] [-o] [-f file] [-h] [config-file]


Using information from a configuration description file (config file) and Basis Package files, MIO generates other files which are used in conjunction with various system utilities to manage the compilation and linking of a Basis code. The goal is to be able to build Basis codes, including Basis itself, on multiple, different computer systems simultaneously.

When run it will read config-file which describes certain details of the compilation of a Basis code which cannot be deduced from information which Unix system utilities can provide. The input from this file is used to create an internal database of values. Mio will set up directories to hold: executable files (bin); library archive files (lib); files used by compilers and interpreters (include); documentation (man); and log files from compilations and other operations typical of a code system (log). It will produce files which help govern compilation and installation of a code as well as a file called configured which is a record of how the code system was last configured for a particular platform.

It will read Package files in subdirectores. Each Package file will create a Directory group in the internal database. It will produce a directory for the kind of platform it is being run on and in that directory write a file called pre-Make which is a part of a Makefile. Also, if an executable script called pck does NOT exist it will write it. If pck does exist it is left alone.


Name of package level config file (default is Package).

Compile sources to be debuggable (default).

A short summary help message.

Compile sources to be optimized.

If competing options are given the last one specified will be taken.


Config File Syntax



include file

file is everything upto the end of the line. Then variables in file are expanded to find the final path name. [XXX - add something about search path]

Conditional Parts of Config file

MIO has a conditional syntax based on gmake.

The general syntax is

Where conditional-directive can be

ifdef arg
Return true if arg has been defined.

ifndef arg
ifeq arg1 arg2
The text of arg1 and arg2 are compared and returns true if equal.

ifeq (arg1, arg2 )


Mio Command Line Options

The Mio:options group is created to record mio command line options.

Name of config file.

-g or -o flag.

Mio Global Variables

Group Variables

If this value is 1, then this group is not written to configured or make-config. This is used to keep the output files from getting too cluttered.


Basis Config Variables

The following variables contain information needed to make a complete configuration in which to build a Basis code. These are things that an automatic process could not successfully compute in as much as they are the means by which you make your intentions concrete.

This is global information in the sense that it pertains to all packages in the code system unless overridden at the package level. Any one of these that does not have a default value or that says otherwise is required. The rest are optional.


There three graphics options currently: no graphics; EZN graphics on top of NCAR; and EZN graphics on top of PGS in PACT. The NCAR version of EZN is the oldest (in fact the first) graphics package in Basis. The PGS version of EZN is newer but the preferred graphics package. The NCAR library may not exist on your platform and is somewhat difficult to build. Because Basis relies on PACT for many other things it means that PGS is always available.


If you change source files, the files which will be compiled or shipped will be only those which were changed since the last make. Do a 'pck remove' to ensure an entire package is compiled.

If you alter a Package or config file you must run mio again before remaking. A 'pck remove' is not required but may be advisable.


Here is an example of a config file for the Linux platform. It is intended to provide examples of the configuration elements only.

  # LINUX - basic LINUX configuration
  Directories = hst fft* svd pfb fit foo
  AUXLibs = -lezn
  SYSLibs = -llapack -lblas
  FGroup : main {
    FOptFlags = -O2
    Flags     = -Mrecursive
  FGroup : other (hst foo/a.m) {
    Optimize  = -O1
  CGroup : main {
    Flags     = -Wall
    Optmize   = -O3

For a single package

   mio -g
   pck build


Creates $cpu/pre-Make and possibly file pck in a package source directory. Creates dev/$cpu/include/make-config, dev/$cpu/bin/install-basis and dev/$cpu/configured.


mio-intro(1), dsys(1)


None known.