docs/65400: make.1: better wording in BUGS section

Warren Block wblock at wonkity.com
Sat Apr 10 16:33:35 UTC 2004


On Sat, 10 Apr 2004, Roman Neuhauser wrote:

> >Description:
> 	the make manual page says:
>
>      For loops are expanded before tests, so a fragment such as:
>
>      .for TMACHINE in ${SHARED_ARCHS}
>      .if ${TMACHINE} = ${MACHINE}
>           ...
>      .endif
>      .endfor
>      won't work, and should be rewritten the other way around.
>
>     This formulation isn't as clear as it could be, it sounds like the
>     loop should be inside the condition. I know it confused me when
>     I was trying to learn make, and recently saw someone else's post
>     about the same thing on one of the lists.

> X-won't work, and should be rewritten the other way around.
> X+won't work, and should be rewritten with the operands swapped.

It's still not very clear (arguments to the .for or the .if?).  Beyond
that, "won't work" is just the sort of thing that most of us hate
because it doesn't provide any details.  Best is to show the right way
in the first place, with a note about why other ways will fail.

The preceding paragraph is not good, either:

  "The evaluation of expression in a test is very simple-minded.  Currently,
   the only form that works is `.if ${VAR} op something' For instance,
   you should write tests as `.if ${VAR} = string' not the other way around,
   which doesn't work."

I can't tell if this applies to the .for/.if paragraph, which has
".if ${VAR} = ${VAR}".

-Warren Block * Rapid City, South Dakota USA



More information about the freebsd-doc mailing list