分类: LINUX
2008-03-21 17:04:54
|
Eclipse building system investigation report
by Rockins
Chen<>,
What's the target of this investigation?
A: Investigate whether there's a mechanism in Eclipse, which can ease the source tree building pain in Linux.
Can eclipse do building task?
A: Yes, of course. It does, indeed.
What is needed to build?
A: Usually GNU make or other equivalence. Besides, you have to install CDT plug-in for eclipse.
Can eclipse generate Makefile automatically?
A: Yes.
Can user write customized Makefile manually?
A: Yes.
Can eclipse build kernel module?
A: Yes. Since eclipse does not care about what you're doing, all its work is calling make to execute the Makefile/makefile.
Is there any button or short key for building?
A: Yes. You can customize the building feature as a button.
Is there anything should be taken care of?
A: Following rule is very important: When writing a makefile manually, you must make sure that the beginning of an action line is started by a TAB. In most situations, eclipse editor choose to replace TAB with 4/8 SPACE. So, if you end up with following error message when building a C/C++ project:
Makefile:2: *** missing separator. Stop.
You must first check whether the TAB is replaced by SPACE. If so, then you should go to Window->Preferences->General->Editors->Text Editors page, toggle the “Insert spaces for tabs” option off.