home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: MPW Lib/Make question
- Message-ID: <1993Jan22.114118.13376@waikato.ac.nz>
- Date: 22 Jan 93 11:41:18 +1300
- References: <1993Jan19.224625.13630@gn.ecn.purdue.edu> <1993Jan20.060444.8192@gn.ecn.purdue.edu>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 53
-
- In article <1993Jan20.060444.8192@gn.ecn.purdue.edu>, jess@gn.ecn.purdue.edu (Jess M Holle) writes:
- >>
- >>I now am having some problems understanding the use of lib and
- >>make under MPW. What I want to do is to be able to automatically
- >>rebuild any of the huge libraries which we use, while only having
- >>to re-compile the files which need it. I also don't want to keep
- >>old object files hanging around.
- >>
- >>In other words, I have one library that is almost 1 MB in size.
- >>When I change 1 source file, I'd like to be able to "make" the
- >>library again and have only the one file recompiled and the
- >>updated information overwrite the old information in the library.
-
- As far as I'm aware, the Lib tool hasn't got any function for *updating*
- a library, you have to rebuild it from scratch. This is probably because
- there is no actual object library format under MPW; library files are just
- concatenations of object modules from separate .o files.
-
- Here's the sort of rule I have in my makefiles for rebuilding an object
- library (I'm using "\" to indicate "hold down the option key and press the
- following key"):
-
- MyLib.o \f \d
- Component1.p.o \d
- Component2.a.o \d
- Component3.mod.o
- Lib -o MyLib.o \d
- Component1.p.o \d
- Component2.a.o \d
- Component3.mod.o
-
- As you can see, it's quite simple (apart from the nuisance of having to write
- out the list of object files twice!). If you edit any of the source files,
- Make will recompile just those, and rebuild the entire library.
-
- Rebuilding a library is fast: I have one built from 90 component object
- files, and it typically takes much less time than recompiling one of the
- Modula-2 or assembler source files.
-
- >>If all else fails, I'll have to leave hundreds of .o files hanging
- >>around my drive, but I'd much rather be able to collect them into
- >>tidy libraries and update them as needed (without a full rebuild).
-
- You still need to keep all the .o files around, otherwise you'll have to
- recompile all the sources each time you rebuild the library. At least you
- can keep them in some subdirectory, separate from the library.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
- You know you've been programming the Mac a long time when...
- ...you know all the arguments to CopyBits by heart.
-