Working under linux for our developement, I have an Eclipse Makefile C Project and I’m trying to override the make command with this so that a custom script I have will run before make to setup additional variables (easier to keep one script in sync than overriding multiple individual project env variables all the time)
Make command: ./setenv.sh && make
Script contents for testing
#!/bin/sh
echo "setenv.sh"
When running this in Eclipse (build project) I see the script output, but make seems to never get called after the script completes. Perhaps I’m missing something and the script requires a return value of some sort and after running it it returns “false” and the chain doesn’t go on but I couldn’t find anything online in my searches on how to get this working.
Note: This is on Eclipse 3.5 Galileo
Thanks
That is probably because
./setenv.sh && makeis a shell command and requires an interpreter to get it executed properly.I would suggest you to set Make command to:
UPD.
To get make targets to be passed as well, one can use
$0and$@provided by the shell:From bash manual:
That is, after Eclipse will append arguments to this command, it would look like:
The shell substitutes
$0withmakeand$@with the rest passed arguments (if any), in the example above they aretargets.... After all, the actually executed command is: