[comp.sys.apollo] Can you have a library like a cmpexe?

abair@turbinia.oakhill.uucp (Alan Bair) (12/09/89)

We have a DN4000 and a DN10000.  To provide programs for our
own use and for our customers to run on any type of machine,
we have started building cmpexe with xar.  This allows us to
have only one program directory for both machine types.

For code developement, we have built up several libraries of
usefull functions.  Currently we have to keep two different
copies for the two machine types and make sure the correct one
is used during binding.  To make life easier, is it possible
to have a library of object files with both machine types 
included like with a cmpexe?  If not, is there some easy way
to make the library selection more automatic, maybe use the
ISP variable?
--
Alan Bair
SPS CAD                   Logic Simulation & Test
Motorola, Inc.            Austin, Texas
...!cs.utexas.edu!oakhill!turbinia!abair

oj@apollo.HP.COM (Ellis Oliver Jones) (12/14/89)

In article <ABAIR.89Dec8170641@turbinia.oakhill.uucp> 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)