[comp.unix.questions] Ultrix 1.2 make suffix assumptions

janm@eliot.UUCP (Jan Morales) (08/10/88)

Let's say I have a file called "foo.c" that compiles to "foo".
When I worked on a System V machine, I was able to type

    make foo

and make would know to run

    cc -O foo.c -o foo

to produce "foo".  Now I'm working on a MicroVAX II running
Ultrix 1.2 and when I say

    make foo

it says

    Make:  Don't know how to make foo.  Stop.

It turns out that make is assuming that executables' names end
in ".out" rather than the name of the source file minus the ".c"
or whatever suffix.  In other words, if I type

    make foo.out

it'll run

    cc foo.c -o foo.out

to produce "foo.out".  The default prerequisite suffixes are:

    .SUFFIXES: .out .o .c .e .r .f .y .l .s .p

My question is how can I change ".SUFFIXES" to include the case
of no suffix just before ".o"?  I assume the answer, if any, lies
in changing ".SUFFIXES".  I know it's no big deal; I'm asking mainly
out of curiosity.  Thanks in advance.

Jan

-- 
---------------------------------------------------------------------------
Jan Morales, Unitech Software, Inc., (703) 264-3301, uunet!pyrdc!eliot!janm

merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) (08/11/88)

In article <248@eliot.UUCP>, janm@eliot (Jan Morales) writes:
| Let's say I have a file called "foo.c" that compiles to "foo".
| When I worked on a System V machine, I was able to type
| 
|     make foo
| 
| and make would know to run
| 
|     cc -O foo.c -o foo
| 
| to produce "foo".  Now I'm working on a MicroVAX II running
| Ultrix 1.2 and when I say
| 
|     make foo
| 
| it says
| 
|     Make:  Don't know how to make foo.  Stop.

Welcome to the differences between UN*X versions.  V7, and the BSD
derivatives (yes, wizards, I know BSD is really V32 :-) don't have any
way to specify a null suffix.  Sys3 and SysV have some added
functionality to allow for null suffixes.  (I don't remember the
syntax at the moment, and I'm on an Ultrix machine, oh well.)  It's
not just a matter of changing .SUFFIXES...  make(1) has to know about
how to do it.

UNIX... the only operating system where reinventing the wheel is a way
of life.  (But at least most of the wheels have shiny chrome :-).
-- 
Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095
on contract to BiiN Technical Publications (for now :-), Hillsboro, Oregon
<merlyn@intelob.intel.com> or ...!tektronix!ogcvax!omepd!intelob!merlyn
Standard disclaimer: I *am* my employer!