Re: Errors in "Using scanners with Builders" example
Bill Deegan <[email protected]> Tue, 30 Jan 2024 11:09:34 -0800
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CEfYmrAGNou_qDr8KsjEF+bAh0rxBY76X+WjC+6QVzX4A@mail.gmail.com> |
Andreas, Pull requests with corrections are always welcome! -Bill On Tue, Jan 30, 2024 at 8:16 AM Andreas Gustafsson <[email protected]> wrote: > Hello Mats, > > Thank you for your quick response! > > You wrote: > > The user guide examples are, in fact, usually processed, to produce the > > command output you see with many of the examples. However this example > > isn't listed as an "scons_example" element, which triggers that > > processing, but as a plain "programlisting", which gets no processing. > > Don't know why, perhaps designing a complete runnable example here > > didn't seem feasible to the author. I also notice that the earlier > > example, in section 20.1, *is* entered as an "scons_example", but then > > the incantation to cause the code to be run and the results captured is > > commented out. Will look into why - I'll file the ticket. > > Speaking of that example, I found it really confusing. It starts out > by saying: > > Suppose, for example, that we want to create a simple Scanner > for .foo files. > > but the example code that follows seems to deal with .k files, > not .foo files. > > Then, if I want to try actually running the example code, I will > presumably have to create my own "kprocess" script. But no matter > where I put it, scons won't actually execute it, because of the line > > env = Environment(ENV={'PATH': '/usr/local/bin'}) > > which overrides the PATH such that scons not only can't find the > kprocess script itself, but apparently can't even find a shell to run > it with. Even installing the script in /usr/local/bin does not help: > > $ ls -l /usr/local/bin/kprocess > -rwxr-xr-x 1 gson gson 4 Jan 30 18:00 /usr/local/bin/kprocess > $ cat /usr/local/bin/kprocess > cat > $ scons > scons: Reading SConscript files ... > scons: done reading SConscript files. > scons: Building targets ... > kprocess < foo.k > foo > scons: *** [foo] sh: No such file or directory > > I figure the PATH override is for the benefit of the automated test, > but surely there is some way to do it without breaking things for > human users. > > Regards, > -- > Andreas Gustafsson, [email protected] > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users