[comp.sys.sgi] #! /usr/sbin/smake

Dan Karron@UCBVAX.BERKELEY.EDU (04/25/91)

I just observed that if the above comment was put into a makefile,
in the first character, like a shell directive,
then when you type make, make will use that program to
process the makefile, instead of the default make.

This is a really useful feature. I never noticed it in the documentation.

In this way, my makefiles can know that they are to be processed
by , say pmake or smake instead of the default make.

Cheers!


| karron@nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
| Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
| 560 First Avenue                       Digital Pager <1> (212) 397 9330    |
| New York, New York 10016               <2> 10896   <3> <your-number-here>  |

jwag@moose.asd.sgi.com (Chris Wagner) (04/25/91)

In article <9104250146.AA25593@karron.med.nyu.edu>, Dan
Karron@UCBVAX.BERKELEY.EDU writes:
> 
> I just observed that if the above comment was put into a makefile,
> in the first character, like a shell directive,
> then when you type make, make will use that program to
> process the makefile, instead of the default make.
> 
> This is a really useful feature. I never noticed it in the documentation.
> 
> In this way, my makefiles can know that they are to be processed
> by , say pmake or smake instead of the default make.
> 
> Cheers!
> 
> 
> | karron@nyu.edu (e-mail alias )         Dan Karron, Research
Associate      |
> | Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical
Center  |
> | 560 First Avenue                       Digital Pager <1> (212) 397
9330    |
> | New York, New York 10016               <2> 10896   <3>
<your-number-here>  |

This was put into 3.3 - at firsxt to help us here at SGI start
to migrate to smake/ parallel make - this way as makefiles
are modified to run in parallel (many just plain work) we can
add #!smake

The make man page has had alot of work done to it in 3.3 - it documents
this feature as well as sinclude (include a file but don't whine about
it not being there), as well as documentation for such arcane features
as VPATH, etc.



----
Chris Wagner (jwag@sgi.com)

sgf@cfm.brown.edu (Sam Fulcomer) (04/26/91)

In article <1991Apr25.153348.26431@fido.wpd.sgi.com> jwag@moose.asd.sgi.com (Chris Wagner) writes:
>In article <9104250146.AA25593@karron.med.nyu.edu>, Dan
>> 
>> In this way, my makefiles can know that they are to be processed
>> by , say pmake or smake instead of the default make.
>
>This was put into 3.3 - at firsxt to help us here at SGI start
>to migrate to smake/ parallel make - this way as makefiles
>are modified to run in parallel (many just plain work) we can
>add #!smake

We've been running gnu-make here for a couple of years now. I've not
done more than look at the man page for pmake, but it seems that the
pmake extensions were modelled after gmake (parallel compiles/jobs
and conditional contructs being the most important to us...).

Since the conditional construct syntax is different, and since we
run gmake everywhere, we don't use pmake.

("parallel" execution really speeds things up on single-proc machines, too.)


-- 
Sam Fulcomer	sgf@cfm.brown.edu		What, me panic: uba crazy

Associate Director for Computing Facilities and Scientific Visualization
Brown University Center for Fluid Mechanics, Turbulence and Computation