Search code examples
linuxeclipseeclipse-cdt

linux eclipse: run a shell command as the pre-build command


How can I have the pre-build step in eclipse/CDT (Linux) run a simple shell command, echo specifically. I think eclipse has a screwed up value for PKG_CONFIG_PATH and want to see what Linux thinks the value is.


Solution

  • Under the covers, Eclipse uses "make". You can simly edit the project's makefile:

    • help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm

    You can also create an:

    "External Tool", which is up there beside the Debug and Run buttons in the toolbar. Then I tell the external tool to run the shell with the configure script and any of it's arguments as arguments to the tool.

    http://www.eclipse.org/forums/index.php/t/61866/