shells inside Makefiles

Peter Kerney peterk at foetus.syd.sgi.oz.au
Tue Oct 23 15:57:15 AEST 1990


>From article <28936 at pasteur.Berkeley.EDU>, by seth at miro.Berkeley.EDU (Seth Teller):
> someone (can't remember who) posted a question about shell constructs
> inside makefiles, and someone else (can't remember who that was, either)
> answered something about complicated things not being possible...
> 
> well, although it's ugly, you can do anything inside a makefile.  
> here's a while loop, all one line (sorry it's so long):
> 

I confess, It was me. I posted the original article.

The problems is not ussimply using shells in Makefiles. The problem is
using 'csh' (THE C-SHELL) from within a Makefile.

The example you gave was a Bourne shell

eg:    while [ test ]
	   done

This is allowed by the shell to be on a single line.
The makefile I want to work is one that uses the C-shell. (I like it better)
Here is a simple test that is anyone can get to work I would love it.

all:
	foreach i (1 2)
		echo $i
	end

If you can get this to work, everything else is possible.

PS: All replies I received gave examples of using the Bourne shell.

-- 
Peter Kerney. Silicon Graphics, Sydney, Australia. (peterk at syd.sgi.oz.au)

If you can't have an IRIS at home,
have the next best thing, an Amiga !!!



More information about the Comp.sys.sgi mailing list