You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AlwaysBuild() does not work if the target is a directory #1426
This issue was originally created at: 2006-06-27 21:33:33.
This issue was reported by: petergummer.
petergummer said at 2006-06-27 21:33:33
I have a SCons script that has a directory as a target. Whenever this target is
specified, I want it to run an associated Command(), regardless of whether the
target directory already exists. The idea is that this command will
automatically do a test run after I have built and installed some applications.
I've got all of this working except for the requirement that it should always
run. I tried to do this with AlwaysBuild(). The SCons manpage says, "Marks each
given target so that it is always assumed to be out of date, and will always be
rebuilt if needed."
Well, I'm afraid it doesn't, if the target is a directory. Here's a 2-line
SConstruct that demonstrates the problem, with a sequence of commands where I
run the script, with and without the target as a directory, and then with and
without the target as a file. Apart from showing that AlwaysBuild() does work if
the target is a file, this also shows that running the script automatically
deletes the target if it is a file, but not if it is a directory. I wonder if
this is the cause of the problem.
Activity