Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Use CDT to Generate Makefile from Within Ant build.xml
Use CDT to Generate Makefile from Within Ant build.xml [message #892779] Fri, 29 June 2012 11:41 Go to next message
Eclipse UserFriend
I was wondering if there is a way to call the CDT builder and just generate the makefile and its .mk files. I'm aware I can use something like "eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ${workspace_loc} -build ${project_loc}/Debug" from a command line to kick off the entire build process for a single project; however, I need to run from within the IDE, and I just want the makefile, objects.mk, sources.mk, and subdir.mk files. Is there a command to do this?

Furthermore, our projects are in a constant state of flux, so it is impractical to have a hardstate makefile for each one (so don't suggest that). Ultimately, the CDT builder does a good job generating the makefile (and its supporting files), but it takes an unacceptably long time to build (~3 min compared to ~12 s when just using make in Ant).

Also, if anyone could point me in a direction such that I could include this as a(n) exec/command in an Ant build.xml, it would be appreciated.

Thanks,
Reece

::System Info::
Eclipse: Indigo SR2 (2.7.*)
CDT: Eclipse IDE for C/C++ Linux Developers 1.4.2.20120213-0813
OS: Linux CentOS 5.4
Ant: Apache Ant 1.8
Re: Use CDT to Generate Makefile from Within Ant build.xml [message #893848 is a reply to message #892779] Thu, 05 July 2012 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Well, I solved my own problem (sort of). It's not the cleanest solution, but you can keep the CDT builder enabled and remove all the build commands from your C/C++ Build Settings for each project. This will still call the CDT builder internally in the IDE, but with blank build commands given, nothing will be executed outside of the makefile generation. Then, the IDE moves onto the next builder (the Ant builder); where build execution occurs.

If anyone knows a way of doing this without keeping the CDT builder enabled, it would still be worth knowing.

Thanks,
Reece
Re: Use CDT to Generate Makefile from Within Ant build.xml [message #1131619 is a reply to message #892779] Thu, 10 October 2013 13:35 Go to previous message
Eclipse UserFriend
Also interested in this feature...
Previous Topic:Many errors launching Eclipse C/C++
Next Topic:Extension point loading problem
Goto Forum:
  


Current Time: Sun May 18 01:10:15 EDT 2025

Powered by FUDForum. Page generated in 0.02917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top