Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I tell SCons to ignore implicit dependencies from command actions?
    primarykey
    data
    text
    <p>By default, SCons seems to look at the 'recipe' used to build a program and extracts implicit dependencies from it. For example suppose my SConstruct contains:</p> <pre><code>Command('foo', 'foocreator.py', '/usr/bin/python foocreator.py &gt; foo') </code></pre> <p>And I've already built 'foo' ('foo' is up to date). Now I change SConstruct (or more realistically, pass different options) so that the command for 'foo' becomes:</p> <pre><code>Command('foo', 'foocreator.py', '/usr/bin/qrsh -V -cwd /usr/bin/python foocreator.py &gt; foo') </code></pre> <p>(In other words, run the foocreator.py script through SGE) Now SCons tries to rebuild foo, --debug=explain tells me that this is because of a "new dependency on /usr/bin/qrsh" and a "dropped dependency on /usr/bin/python").</p> <p>How can I prevent this inference of dependencies from the recipe, preferably globally? So far I haven't even been able to find a specification of this behaviour. I don't want to have to spell out the fact that 'foo' doesn't really depend on python or qrsh, because I would have to do that for every target and for every possible location of those programs. There must be a "right" way.</p> <p><strong>EDIT</strong>: I have also now tried explicitly adding Ignores for each target, as in:</p> <pre><code>Ignore('foo', '/usr/bin/python') Ignore('foo', '/usr/bin/qrsh') </code></pre> <p>and even this doesn't work! SCons still wants to rebuild everything whenever I switch between running through qrsh and not.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload