home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!olivea!pagesat!netsys!agate!stanford.edu!eos!data.nas.nasa.gov!taligent!kip-50.taligent.com!user
- From: keith@taligent.com (Keith Rollin)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: MPW Lib/Make question
- Message-ID: <keith-210193233528@kip-50.taligent.com>
- Date: 22 Jan 93 07:50:55 GMT
- References: <1993Jan19.224625.13630@gn.ecn.purdue.edu> <1993Jan20.060444.8192@gn.ecn.purdue.edu> <1993Jan22.114118.13376@waikato.ac.nz>
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Followup-To: comp.sys.mac.programmer
- Organization: Taligent
- Lines: 88
-
- In article <1993Jan22.114118.13376@waikato.ac.nz>, ldo@waikato.ac.nz
- (Lawrence D'Oliveiro, Waikato University) wrote:
- >
- > 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.
-
-
- You can sort of update a library using the Lib tool (although it's close to
- rebuilding from scratch, like you say). Use something like:
-
- Lib -d -o NewLib Updated1.o Updated2.o OldLib
- Rename -y NewLib OldLib
-
- Just remember to specify the .o files with the updated routines before the
- library holding the old routines, and that Lib doesn't like to write its
- output to any of the input 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.
-
-
- You don't have to specify the list of object files twice. Use either of the
- following instead:
-
- ----------
-
- MyLib.o \f \d
- Component1.p.o \d
- Component2.a.o \d
- Component3.mod.o
- Lib -o {Targ} {Deps}
-
- --- or ---
-
- MyObjects = \d
- Component1.p.o \d
- Component2.a.o \d
- Component3.mod.o
-
- MyLib \f {MyObjects}
- Lib -o {Targ} {MyObjects}
-
- ----------
-
-
- > You know you've been programming the Mac a long time when...
- > ...you know all the arguments to CopyBits by heart.
-
-
- How about Munger? Or NewWindow? Or DragGrayRgn? Or AESend? Or when you can
- fill in the necessary fields of a parameter block for a low-level File
- Manager call (like PBCatSearch)? Heck, CopyBits is easy...
-
- -----
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-