[M3devel] Multiple executables from the same source

Hendrik Boom hendrik at topoi.pooq.com
Sun Jul 7 04:11:18 CEST 2013

I'm writiing and debugging a bunch of interfaces and modules.
They are all supposed to fit together into one happy executable.

But of course, until I've finished debugging them
  they fit together into one unhappy executable.
To test them properly I'd like to write a series of unit tests.
To run these tests I will need  to make further executables,
  each consisting of a test modules and several of the modules under test.

Now with the usual structure of a Modula 3 workspace,
  there is one m3makefile and a src directory, and it makes one executable,
  not many,
  and it doesn't really give me a choice of which executable I want.

In the old days of C code and Makefiles, I could have multiple targets
  each one being built with its own cc command
  with its own list of source files names.

Is there anything comparable for Modula 3?

The best I've come up sith so far is to have a number of directories,
  one for each test case,
  with its own m3makefile and its own symbolic link to a common src directory.

Is there something better?

I'm not really interested in having all the test code
  be part of the final application.

For one thing,
  I'd like to be able to test multiple implementations of a single interface,
  such as a reference implementation and an efficient one,
  so that I can compare the output and complain about the differences.

-- hendrik

More information about the M3devel mailing list