Problem with make

Michael Morrell morrell at hpsal2.HP.COM
Tue Oct 3 03:31:14 AEST 1989


/ hpsal2:comp.unix.questions / guy at 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.



More information about the Comp.unix.questions mailing list