Wierd resolution of output paths for vapis headers and c files.
Submitted by ale..@..dex.ru
Link to original bug (#669175)
Description
When I compiled the file extentdemo.vala with the command like this: "valac --ccode --pkg=gtk+-3.0 --directory=gen-code --vapi=vapi/extentdemo.vapi --header=gen-code/extentdemo.h --output=extentdemo.c extentdemo.vala" it's reasonably good guess that the file "extentdemo.c" would appear in the "gen-code" directory, but it appeared in the current directory that is next to "extentdemo.vala". Even worse, when I compiled with the command "valac --ccode --pkg=gtk+-3.0 --directory=gen-code --vapi=vapi/extentdemo.vapi --header=gen-code/extentdemo.h --output=gen-code/extentdemo.c extentdemo.vala" it all the same generated "extentdemo.c" in the current directory.
Another question is why valac treats the path for --vapi option relative to the path specified with the --directory (that is --directory=gen-code --vapi=vapi/extentdemo.vapi stands for ./gen-code/vapi/extentdemo.vapi) whereas the path for --header option is treated relative to the current directory (that is --directory=gen-code --header=extentdemo.h stands for ./extentdemo.h)? I believe that if the path for --vapi is treated relative to the current directory and the path for --header option is relative to the one specified with --directory it would be more expected and consistent behavior.
Version: 0.15.x