Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!apollo!oj From: oj@apollo.HP.COM (Ellis Oliver Jones) Newsgroups: comp.sys.apollo Subject: Re: Can you have a library like a cmpexe? Keywords: ISP Message-ID: <4767565a.14e4f@apollo.HP.COM> Date: 13 Dec 89 16:24:00 GMT References: Reply-To: oj@apollo.hp.com Distribution: comp Organization: Apollo Computer, Chelmsford, MA Lines: 43 In article abair@turbinia.oakhill.uucp (Alan Bair) writes: >To make life easier, is it possible >to have a library of object files with both machine types >included like with a cmpexe? No, that's not the way we do it. You could write some sort of type manager, but I doubt it would be worth the effort. >If not, is there some easy way to make the library >selection more automatic, maybe use the ISP variable? Yes, this is the way we deliver the .a files we furnish. For a simple example, consider the Open Dialogue library /usr/apollo/lib/libdlgprs.a : When we install it, we install all the following things in /usr/apollo/lib : lrwxrwxrwx 1 root 18 Dec 13 10:19 libdlgprs.a -> libdlgprs_$(ISP).a lrwxrwxrwx 1 root 16 Dec 13 10:19 libdlgprs_.a -> libdlgprs_m68k.a -rwxrwxr-x+ 1 root 68032 Nov 21 13:48 libdlgprs_a88k.a -rwxrwxr-x+ 1 root 55779 Nov 21 13:21 libdlgprs_m68k.a You'll find the ISP environment variable always defined, so if you refer to libdlgprs.a, the file system follows the symbolic link to libdlgprs_a88k.a (when your program is running on a Prism) or the other one (when your program is on a m68k): ISP=a88k ... libdlgprs.a --> libdlgprs_$(ISP).a --> libdlgprs_a88k.a ISP=m68k ... libdlgprs.a --> libdlgprs_$(ISP).a --> libdlgprs_m68k.a If the ISP variable is, perchance, not defined (due to some problem someplace) you get the default via libdlgprs_.a The default depends on what kind of machine the directory is installed on. ISP= ... libdlgprs.a --> libdlgprs_$(ISP).a --> libdlgprs_.a --> libdlgprs_m68k.a This Open Dialogue installation is the simplest form of this ISP dependency. We almost never have trouble at runtime with this kind of stuff, although installing it from install-scripts takes a lot of care. For a more complex approach involving ISP-specific subdirectories, please look at /usr/lib . /Ollie Jones (speaking for myself, not necessarily for HP Apollo)