[Cook] [shell] versus regular command problem.
Peter Miller
millerp at canb.auug.org.au
Wed Jul 16 22:03:27 EST 2003
On Tue, 2003-06-03 at 05:19, Simon Clift wrote:
> 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];
> }
First, your cpp_include_flags should be set to
cpp_include_flags = [addprefix "-I" [search_list]];
Second, the recipe should read
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=" [search_list]]
-o [target];
}
That is, do not unsplit the -rlp arguments.
> failing with "exit status 1":
This is odd. There doesn't appear to be a code path capable of exiting
1 without also printing an error message.
If you can produce a small test case which consistently fails I have a
better chance of tracking it down.
> The command is fine just run from the
> shell, as is the "corrected" form of the recipe:
> where I put everything in a [shell] command. I got this a
> lot as well with commands that had shell redirection.
You could put a
setenv SHELL = [shell];
at the top of the cookbook. This controls the shell used to execute
commands.
> 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.
This could be it. The tcsh start-up files, that is,
before c_incl is even run (the shell is exec()ed with a -e argument, so
it aborts at the first error).
--
Regards
Peter Miller <millerp at canb.auug.org.au>
/\/\* http://www.canb.auug.org.au/~millerp/
PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53 2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20030716/23bdb7d3/attachment.pgp>
More information about the Cook-users
mailing list