#8 wrong dependency file path

open
nobody
None
5
2007-04-09
2007-04-09
ASManiac
No

if i have:
/1/2/3/4/5/main.aap:
---
:program myprog : ../one.c ../../two.c ../../../three.c
---

than AAP creates:
/1/2/3/4/5/one.c.aap
/1/2/3/4/two.c.aap
/1/2/3/three.c.aap

instead of:
/1/2/3/4/5/build/_/one.c.aap
/1/2/3/4/5/build/_/_/two.c.aap
/1/2/3/4/5/build/_/_/_/three.c.aap

i found the function 'srcitem2obj' responsible for the object file path calculation and fixed DoBuild.py:
> diff DoBuild.py.bak DoBuild.py
32a33
> from RecPython import srcitem2obj
1376c1377,1383
< recipe = work.get_node(os.path.join(d, source.short_name()) + ".aap", 1)
---
> special_dict = {}
> if source.attributes:
> special_dict.update(source.attributes)
> if source_dict:
> special_dict.update(source_dict)
> special_dict.update({"suffix": os.path.splitext(source.get_name())[1] + ".aap"})
> recipe = work.get_node(srcitem2obj(recdict, source.short_name(), special_dict), 1)
---

i am not sure that the fix is conceptually correct and the shortest possible. at least it works properly so far.

Discussion