[Cook] [shell] versus regular command problem.

Simon Clift ssclift at math.uwaterloo.ca
Tue Jun 3 05:19:45 EST 2003


Hi folks,

I've been having some trouble with cook and am wondering if
anyone else has seen this before and might know how to fix
it, please.

I'm using Cook 2.22 on Red Hat 9 system (fairly generic),
use tcsh and tend to use literate programming, so I extract
compilable files from the source directory into an object
directory to keep the clutter down.

I keep having an odd problem.  Today it was the recipe to
generate dependencies among generated C++ files:

obj/%0%.cpp.d: obj/%0%.cpp 
{
	[c_incl] -nc -ns -nrec
		[cpp_include_flags] [resolve obj/%0%.cpp]
		-prefix "'cascade obj/%0%.cpp ='"
		-suffix "';'"
		[addprefix "-rlp=" [unsplit ":" [search_list]]]
		-o [target];
}

failing with "exit status 1": 

cook: /usr/local/bin/c_incl -nc -ns -nrec -I./obj
        -I/home/Aegis/sjopt/branch.1/branch.0/baseline/obj obj/Grid.cpp
-prefix
        'cascade obj/Grid.cpp =' -suffix ';'
        -rlp=.:/home/Aegis/sjopt/branch.1/branch.0/baseline -o
obj/Grid.cpp.d
cook: command /usr/local/bin/c_incl: exit status 1

and no other error.  The command is fine just run from the
shell, as is the "corrected" form of the recipe:

obj/%0%.cpp.d: obj/%0%.cpp 
{
	[shell [c_incl] -nc -ns -nrec
		[cpp_include_flags] [resolve obj/%0%.cpp]
		-prefix "'cascade obj/%0%.cpp ='"
		-suffix "';'"
		[addprefix "-rlp=" [unsplit ":" [search_list]]]
		-o [target]];
}

where I put everything in a [shell] command.  I got this a
lot as well with commands that had shell redirection.

I suspect it's something in shell rc files but I've not seen
how to set some control parameters in cook to get things to
trace properly.

Any pointers would be appreciated.

Thanks
--- Simon


-- 
Simon Clift                  E-mail: ssclift at math dot uwaterloo dot ca
Ph.D. Student
Scientific Computation Group
University of Waterloo
Waterloo, Ontario, Canada
N2L 3G1




More information about the Cook-users mailing list