Subject: Re: .for vs ${SH} for ...
To: Tomasz Luchowski <>
From: Bill Sommerfeld <>
List: tech-pkg
Date: 01/10/2001 09:07:35
> There are to ways to use 'for' in Makefiles, by typing '.for ... .endfor'
> and ${SH} for ....

> Which way is prefered?

There are two ways to do conditionals in C, '#if .. #else ... #endif'
and "if() .. else ... ".  Which way is preferred? :-)

.for is interpreted in a preprocessor-like phase, and can create
multiple nodes in the dependancy graph.

Which one to use depends on what you're trying to do; in general, the
shell "for" is to be preferred, but you can do things with .for which
you can't do with "for".

"for" is interpreted by the shell, not make, and thus is attached to a
*single* node in the dependancy graph; .for can be used to create
multiple dependancy nodes.  See /usr/share/mk/ for an

					- Bill