Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 2 - Working With MacApp
Appendix A - Working With the MacApp Build System


Default Inputs Provided to MABuild

MABuild takes two sorts of inputs: the defaults provided to MABuild from various preexisting sources and the defaults you provide.

MABuild uses the defaults written into its code and those provided by the definition of MPW shell variables in MacApp's 1Startup file. For example, to build MacApp's own libraries MABuild uses MacApp's makefile, along with several partial makefiles, including Definitions_Common, Definitions_68K (Definitions_PPC for a Power Macintosh build), and Dependencies_68K (or Dependencies_PPC). It also uses the source code files and resources that make up the MacApp libraries. A similar process is used to build your application.

One-File Build Configuration

When your program is stored in one file--that is, your main program, interface, and implementation are all in the same program module--MABuild provides several defaults to make the build process work.

In the absence of a resource definition file (YourApp.r), MABuild uses MacApp's default resource file, Defaults.r, to build the application. This file includes resources to support all the building blocks (such as UDialog and UPrinting) and therefore may be larger than strictly necessary for your application. MABuild also uses the partial makefiles provided by MacApp to set default options for the build process.

When all your code is in the main program module, you can use the simplest form of the MABuild command to build your application. Simply enter MABuild followed by a single parameter, the name of the application. To build a program named YourApp, you type MABuild YourApp in your MPW worksheet window and press the Enter key. MABuild is the command, and YourApp is the name of the target application.

Note
If you use only the name of the application as the target parameter, be sure to set the MPW directory to the location of your source code before starting the build. Or you can prefix the target application name with the pathname of the source code directory.

MPW Shell Variables for MABuild

The MABuild script looks at a number of global MPW shell variables to determine default behavior for MABuild. These variables are set in MacApp's 1Startup file. Although you can modify any of these variables, comments in the startup file indicate certain variables you normally avoid changing. The following variables are ones you can safely change:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996