# m3where

m3where is a program that locates Modula-3 source files, relative to a particular program or library package. By default it locates the given units relative to the default build directory of the package that is rooted at the current working directory. The -d option can be used to specify the pathname of a particular package to be used to locate the units. Sources that are hidden (not exported) by the packages are not located unless option -h is set.

The syntax for invoking m3where is

         m3where [options] [units ...]

If no units are given, m3where enumerates all of the sources associated with the package and those that it imports. Sources that are hidden (not exported) are not shown unless option -h is set.

The units are specified as filenames of the form "`Foo.`xx", where "xx" is one of the standard Modula-3 file extensions (.i3, .m3, .ig, .mg...). Wildcards are not supported.

Note that, in order for m3where to work, m3build must have been run at least once for the given package/build directory pair.

If the given units can be located, the full pathnames are output to the standard output, otherwise an error message is output.

The following options are interpreted by m3where.

- -h Show all sources, including the hidden ones.
- -b "dir" Search the build directory named dir. The default directory is configured into m3where when it is installed.
- -d "dir" Locate units from the package that is rooted at dir. dir must be an absolute pathname.
- -T "dir" Read templates from dir instead of the default location.

For example,

        m3where Pathname.i3

would try to find the file Pathname.i3 from the information in the build directory of the package rooted at the current working directory.

And,

        m3where -b NT386GNU -d /proj/m3/pkg/libm3 PathnameWin32.m3

would try to find the file PathnameWin32.m3 using the information in the NT386GNU build directory of the libm3 package.