ValaProgram('target', files) does not create an executable 'target'

Russel Winder avatarRussel Winder created an issue

env.ValaProgram('target', files) does not make an executable named 'target', because it does not pass 'target' to valac's --output parameter. This is due to the fact that baseCommandString does not include the --output or -o parameter. I have attached a fixed version of the script (hopefully not breaking anything). Bonus: It also fixes scons -c (previously it didn't remove the compiled executable).

See original report by Filip Lamparski at https://bugs.launchpad.net/scons-vala/+bug/1019867

Comments (3)

  1. Filip Lamparski

    Actually, I think that specifying both the directory and the output file seems a bit redundant, and may even cause some problems. You should probably just get rid of -d altogether.

  2. Russel Winder

    SCons is always happier knowing about each file, especially to do the -c clean-up. I guess I was in Java tool thinking when putting the Vala command line together, put the -d and didn't think things through. Definitely need some tests though, I'll try and put a couple together.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.