Thanks Gary.
The devil is in the details....

>>
I'm not sure what you're asking above, and your cut & paste is a little off.  
The intent is, if the prefix ends with a space, add the prefix (without the 
space) to the result list as a separate element.
That supports linkers that instead of -lfoo might need -l foo as two args.  
(Note that without this, it would end up getting quoted by the quoting logic as 
"-l foo").
>>
This clears up the logic a little. But seems very C/C++/Fortran based. I 
honestly do find the "" logic messes up more than it helps. I guess I view this 
a little buggy as I would think that the idea of quoting an item because it has 
a space, vs making a separate item error prone and acquired.

>>
If you think about LIBS, you mostly want the pre/suffixes added (-lfoo for 
instance).  But passing through File nodes allows you to specify a particular 
version of a lib (as well as static vs. shared) by passing a Node representing 
the file.  I don't think there's a use case for Value nodes, so who knows what 
the right thing is.  Directory nodes are interesting; one could argue they 
should be passed through as well, for the same kinds of reasons.  I just don't 
think this code gets called on Directory nodes much.
>>

I guess I not sure how one makes portable binaries by doing this on posix 
systems. Normally this hard codes a path in binary, and causes other 
complication from what I know. Honestly I was always under the view that if a 
gave a node here it would prevent the need to scan for it, saving a little 
time, and would ideally split the node to a libpath + lib value as expected on 
the system.

I guess given the code that exist node objects are passed in all the time to 
this API... for example if you look at _concat(...) there is a call to:
l = f(SCons.PathList.PathList(list).subst_path(env, target, source))
in this case l is a list of node objects given the path list was able to map 
the subst() value to a node. ( Which is sort of funny that we map the node to a 
string then back to a node). Given this, a case such as LIBPATH is given list 
of directory nodes which makes it very common. It seems to me that the lib case 
is come special case, that can cause issue on other toolchain in which you 
would want the file object to get some prefix. Take a manifest files for 
example.

Jason  

_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to