Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hpsal2!morrell
From: morrell@hpsal2.HP.COM (Michael Morrell)
Newsgroups: comp.unix.questions
Subject: Re: Problem with make
Message-ID: <14660016@hpsal2.HP.COM>
Date: 2 Oct 89 17:31:14 GMT
References: <715@bbking.KSP.Unisys.COM>
Organization: HP System Architecture Lab, Cupertino
Lines: 27

/ hpsal2:comp.unix.questions / guy@auspex.auspex.com (Guy Harris) /  3:08 pm  Sep 29, 1989 /

 >|  I'm having a problem using a 'for' statement with 'make'.  Consider
 >|  the following trivial makefile:
 >|  
 >|  test:
 >|  	for i in 1 2 3 4; do echo "hello"; done
 >|
 >|  This always generates an error such as
 >|  Syntax error:  do:  command not found
 >
 >  I tried this on three SysV machines and it worked on all of them. You
 >are doing something other than what you think you are, because this
 >flies on Xenix, Stellar, and Unicos.

What he's doing is using the C shell as his login shell, and using a
"make" that imports the SHELL environment variable as the "make"
variable SHELL and uses the latter to select which shell should be used
to run commands that can't be run directly by "make".
----------

Strange.  HP-UX uses a version of "make" which imports SHELL, but I get a
different error message:

    for: Command not found.

Maybe that's just due to the differences in the csh's.