Re: Mass bugfiling potential: 'rules' with space
In chiark.mail.debian.devel, you wrote:
>(For what it's worth, the failure mode is 'make: : No such file or
>directory'; I think NetBSD is seeing the extra space, and adding an empty
>string to the argument list, since that is what is after the space).
With the aid of something that just walks through argc:
1) NetBSD, no trailing space in interpreter line
mjg59@cysteine:/tmp/test$ ./test.sh
Argument 0 is ./a.out .
Argument 1 is a b c d .
2) NetBSD, trailing space in interpreter line
mjg59@cysteine:/tmp/test$ ./test.sh
Argument 0 is ./a.out .
Argument 1 is a b c d .
^
3) Linux, no trailing space in interpreter line
mjg59@cavan:/tmp/test > ./test.sh
Argument 0 is ./a.out .
Argument 1 is a b c d .
4) Linux, trailing space in interpreter line
mjg59@cavan:/tmp/test > ./test.sh
Argument 0 is ./a.out .
Argument 1 is a b c d .
So the Linux interpreter strips off any trailing space characters before
passing it to the application, whereas NetBSD doesn't. I'm not convinced
that this is a bug in NetBSD (SUS only mentions #! notation in a single
paragraph, and gives no exact details of it), but possibly make should
be a bit more resiliant here.
--
Matthew Garrett | mjg59-chiark.mail.debian.devel@srcf.ucam.org
Reply to: