Packages

SRC Modula-3 is distributed as a set of packages. Each package is contained in a single directory which conforms to a standard structure. The top level directory should contain a README file, a COPYRIGHT file, and a src subdirectory containing Modula-3 source files, and a derived directory for each platform on which the package has been built.

Public packages are located in a fixed location in the file system that is determined at configuration time (e.g. /proj/m3/pkg or /usr/local/lib/m3/pkg). The public packages include the shared interfaces, libraries and programs available at your site.

There are three primary types of packages: source, program, and library. A source package contains a collection of Modula-3 sources; it builds nothing. Consequently it will contain no derived sub-directories. A program package constructs a single executable program by compiling and linking the contents of a set of source packages. Similarly, a library package constructs a single library from a set of source packages.

The m3makefile, that describes the package, resides in the src subdirectory of the package. Although it is common for all the Modula-3 sources to also reside in the src directory, they may be distributed in a more complex directory structure rooted at src.

The m3makefile for a source package simply lists the pieces of source that are to be included in programs or libraries that include the source package.

The m3makefile for a program package names the sources needed to build the program, and the packages that it uses to satisfy its imports. It ends with a single program() or Program() invocation. See the example.

The m3makefile for a library package names the sources to be included in the library, and the packages that it uses to satisfy its imports. It ends with a single library() or Library() invocation.

Note that as in a program, all the imports of a package must be satisfied. If a package A builds a library and any of the objects in that library import interfaces from another library package B, then import(B) must be specified in A's m3makefile.

Use m3ship to install a private package in the public repository. Note that on some systems, you must have special privileges to install public packages.


[Modula-3 home page]

m3-request@src.dec.com
Last modified on Thu Jan  4 11:08:01 PST 1996 by heydon 
     modified on Thu Apr 28 08:20:49 PDT 1994 by kalsow 
     modified on Thu Jan  7 18:40:57 PST 1993 by muller 
Copyright (C) 1992, 1996, Digital Equipment Corporation. All rights reserved.
See the COPYRIGHT for a full description.