How to Run Scripts from Within Eclipse

How to Run Scripts from Within Eclipse

I have a project that doesn't use autotools, but has a Makefile which I run to build the code. This make file is run from within in a shell script. I have imported the project in eclipse, but I can't seem to run the shell script (Something like Ctrl + B to Make or add one of the Make targets viz., make all or make install).

Is there a way I can do this?

2 Answers

You can specify a script to build your project in Project Properties -> C/C++ Build -> Build Command -> Builder Settings.

You can uncheck Use default build command and specify yours (e.g. make all, make install or bash make_all.sh). Or you can leave the default build command (it must be make) and in tab Behaviour specify targets.

But before you should have imported your project Makefile Project with Existing Code.

Don't use Eclipse if you are using Make tools in the same project. Eclipse brings you some tools for project compiling, etc. that you already have with Make/Automake.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.