How To Use and Automate Your Macintosh MakeFile

Last reviewed: June 4, 1996
Article ID: Q129864
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c, and 2.6a

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 4, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.