How To Use and Automate Your Macintosh MakeFile

ID: Q129864

2.50b 2.50c 2.60a MACINTOSH kbtool

The information in this article applies to:

SUMMARY

This article describes how to use the MakeFile that ships with the FoxPro for Macintosh Library Construction Kit (LCK) and how to automate its use for all MLB files that you want to create.

MORE INFORMATION

The MakeFile that comes with the FoxPro for Macintosh LCK is the file used by the MPW (Macintosh Programmer's Workbench) to create the command that successfully builds an MLB file that can be used with any version of FoxPro for Macintosh. The MakeFile is specifically written to create a MLB file from TESTLIB.C file that also ships with FoxPro for Macintosh LCK.

Once you successfully test the build process of TESTLIB.C, you may want to build your own source files. To do this, edit the MakeFile to accept this change by removing every instance of the word "Testlib" and replacing it with the name of your .C file. This can be done with a search and replace for the file name, but it can become very tedious to do this; especially if you have more than one .C file you wish to compile.

To simplify this process, follow these steps:

1. Find and double-click the MakeFile in the MPW folder. (This file

   originally shipped with the FoxPro LCK but should be moved to the MPW
   folder.

2. At the beginning of this file, add a new variable setting in the same
   format the other variables use such as ROOTDIR, SRC, and so on. For
   example:

   CFILENAME = <source .c name>

3. Choose Replace from the File menu (COMMAND+R).

4. In the "Find what string?" line type Testlib.

5. In the "Replace with what string?" line type {CFILENAME}.

6. Click the Replace All button.

7. Save changes to the MakeFile, and close it.

Once you implement these changes, you need only change one line of the MakeFile for each .C file you have. Every time you compile a new MLB file just change the CFILENAME line to point to your new .C file and that's all you have to do.

Additional reference words: FoxMac 2.50b 2.50c 2.60a LCK Mac KBCategory: kbtool KBSubcategory: FxtoolLck

Keywords          : FxtoolLck 
Version           : 2.50b 2.50c 2.60a
Platform          : MACINTOSH

Last Reviewed: June 5, 1996