[Scons-users] Strage behavior of Alias() method for executables on unix platforms

Greg Ward greg at gerg.ca
Wed Jul 4 21:17:59 EDT 2012


On 05 July 2012, Alexey Petruchik said:

> Hi, everybody. Noticed one strange behavior in scons. He is very simple

> test project: https://bitbucket.org/stopiccot/scons_alias_bug2

> There are two targets in it. Because of "build" variant dir for building

> program I need to write to terminal "scons build/some_program" or "scons

> build/libsome_library.dylib" (I'm using mac) to build this targets. I've

> added two empty aliases 'some_program' and 'some_library'. And when I write

> to console "scons some_library" I get "Nothing to be done for

> `some_library'." as expected because I haven't assigned anything for this

> alias but for "scons some_program" it actually builds program target as if

> I had wrote "scons build/some_program".


Are you using VariantDir() to put things in build/? If so, I believe
you are seeing expected behaviour here.

However, it's unclear what SCons is supposed to do if you define an
Alias with the same name as a target file. Sounds like the file takes
precedence over the alias. Would be nice if it printed a warning when
you do this.

Greg
--
Greg Ward http://www.gerg.ca/
I'm on a strict vegetarian diet -- I only eat vegetarians.


More information about the Scons-users mailing list