generating code to run multiple targets/configurations from single

Tim Bray tbray at watsol.waterloo.edu
Mon Apr 10 00:44:32 AEST 1989


In article <10445 at bloom-beacon.MIT.EDU> scs at adam.pika.mit.edu (Steve Summit) writes:
>One thing I've found which helps is if your C compiler(s) pay
>attention to the -o flag even in the presence of -c.
>Then you can you can use a different
>suffix (not just .o) for each kind of object file, and keep them
>all in the same directory with one copy of the source.  I've used
>.ovax for vax, .o11 for pdp11, .po for profiled, etc.
An excellent idea, but you happen to be in the Sun world, and you're running
Sunos 4.x, and you do this, you get hundreds of brain-dead idiotic warnings
from cc about 'file with unknown suffix .po passed to ld'; not that it doesn't
work.  I mean, *I* know what the file is, *unix* knows what the file is
by looking at the magic number, which ld BETTER DO ANYHOW, on Unix we gotta
depend on file extensions to tell us what a file is?, gotta wonder what kind
of underworked enthusiast at Sun put that inspiration in.

Grumble, Tim Bray, New OED Project, U of Waterloo, Ontario



More information about the Comp.unix.wizards mailing list