After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740303 - Inconsistent behaviour output path of C files
Inconsistent behaviour output path of C files
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-18 11:08 UTC by pancake
Modified: 2017-03-14 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
State in valac --help that default output directory is current working directory (1.33 KB, patch)
2017-03-09 21:36 UTC, Al Thomas
committed Details | Review

Description pancake 2014-11-18 11:08:05 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.
Comment 1 Al Thomas 2017-03-09 21:36:08 UTC
Created attachment 347576 [details] [review]
State in valac --help that default output directory is current working directory
Comment 2 Rico Tzschichholz 2017-03-14 11:17:24 UTC
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