[Scons-users] Command fails if action is simply $SOURCE
William Deegan
bill at baddogconsulting.com
Thu Feb 28 14:51:13 EST 2013
Gary,
On Feb 28, 2013, at 11:21 AM, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
> I seem to remember this is an old bug. Even adding a space before or after should fix it. Can't look it up right now but if you find it, feel free to add your test case.
Is this the bug you're thinking of?
http://scons.tigris.org/issues/show_bug.cgi?id=2845
If so perhaps Carnë can add his test case to it?
-Bill
>
>
> On Thu, Feb 28, 2013 at 2:11 PM, Carnë Draug <carandraug+dev at gmail.com> wrote:
> On 28 February 2013 18:56, William Deegan <bill at baddogconsulting.com> wrote:
> > On Feb 28, 2013, at 10:15 AM, Carnë Draug <carandraug+dev at gmail.com> wrote:
> >> I'm trying to set a bunch of scripts as commands which are then
> >> grouped as a single target with Alias. I'm doing something like this
> >>
> >> analysis1 = env.Command(target = "result1", source = "script1.pl",
> >> action = "$SOURCE")
> >> analysis2 = env.Command(target = "result2", source = "script2.pl",
> >> action = "$SOURCE")
> >> analysis3 = env.Command(target = "result3", source = "script3.pl",
> >> action = "$SOURCE")
> >>
> >> env.Alias("analysis", [analysis1, analysis2, analysis3])
> >>
> >>
> >> However, this fails. All I get is:
> >>
> >> $scons analysis
> >> scons: Reading SConscript files ...
> >> scons: done reading SConscript files.
> >> scons: Building targets ...
> >> scons: done building targets.
> >>
> >> I can make SCons run the scripts if I set the action to "./$SOURCE",
> >> "perl $SOURCE", "$SOURCE --" or anything like that. The files should
> >> have the correct permissions (744). Even if I set $SOURCE to a path, I
> >> get the same problem so shouldn't be a matter of adding anything to
> >> the search path.
> >>
> >> Is this a bug in SCons or am I doing something wrong? And is there a
> >> better way to do this?
> >
> > Try: "scons --debug=explain analysis"
>
> This shows me that SCons recognizes the target as something to build
> but then does nothing about it:
>
> $ scons --debug=explain analysis
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> scons: building `result1' because it doesn't exist
> scons: building `result2' because it doesn't exist
> scons: building `result3' because it doesn't exist
> scons: done building targets.
>
> Nothing is done with the scripts. Just for test, I made the scripts to
> just print something, or give an error but nothing happens ever.
>
> > Also can you paste the output from:
> > scons --tree=prune analysis
>
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> +-analysis
> +-result1
> | +-scripts/script1.pl
> +-result2
> | +-scripts/script2.pl
> +-result3
> +-scripts/script3.pl
> scons: done building targets.
>
> I have attached a tarball with the example, for ease of replication.
>
> I have tried to pass the path for the scripts with os.path.join() and
> os.path.abspath() but none worked.
>
> Carnë
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
>
>
> --
> Gary
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130228/d7a80566/attachment.htm>
More information about the Scons-users
mailing list