GNOME Bugzilla – Bug 740303
Inconsistent behaviour output path of C files
Last modified: 2017-03-14 11:17:28 UTC
Looks like valac generates the C files in current directory or source directory depending on the path used, also, -d doesnt seems to work fine with relative paths. For example: ~$ mkdir foo ~$ echo 'void main(){print("Hello");}' > foo/test.vala ~$ valac -C foo/test.vala output generated in foo/test.c which is ok. ~$ cp foo/test.vala /tmp ~$ valac -C /tmp/test.vala output is in ~/test.c which is wrong About the -d thing.. the relative path to the file is appended to the destination path, which maybe its ok, but $ valac -d /tmp/ -C foo/bar.vala output is in /tmp/foo/bar.c if all those behaviours is expected, maybe it should be documented somewhere, otherwise it should be fixed.
Created attachment 347576 [details] [review] State in valac --help that default output directory is current working directory
commit 35305193dbc819e9ed1883e7657206aaac7736e1 Author: Alistair Thomas <astavale@yahoo.co.uk> Date: Thu Mar 9 21:33:50 2017 +0000 valac: State default output directory is current working directory