Page 1 of 1

Great Tool! Questions of course

Posted: Thu Jun 07, 2012 8:53 pm
by jdarnold
I'm really glad I found Codelite. I've been looking for a good IDE, as embarrassing as that is to admit by a hardcore hacker. I got used to things like code completion, suggestions, refactoring and parameter hints when doing an Android project in Java for Eclipse. I don't like how Eclipse does its C++ coding, so I couldn't use that. And, for the most part, Emacs is my "IDE".

But I just started using Codelite and have really enjoyed its 'makefile' generating ease. But, as a new user, I of course have plenty of questions and/or enhancement requests, so let the flood begin!

First up is how can I add a target to Clean? We build a third party library via a script they ship with it and we test whether to run the build script by the existence of one of the static libraries. So the Custom Makefile Rules works great.

But when I do a Project Clean, I'd like to have it delete the static library we check so we rebuild it. The normal way for Gnu Make is to use '::' instead of ':' in all instances of the target, so it appends the clean checks. But that only works if all of them are done with '::' and the generated one doesn't use it. How else can I have the generated .a file removed with a Clean?

Sorry, should have added some info. This is a Codelite I built from source on Centos 6.

Re: Great Tool! Questions of course

Posted: Sat Jun 09, 2012 7:25 pm
by eranif
jdarnold wrote:But when I do a Project Clean, I'd like to have it delete the static library we check so we rebuild it. The normal way for Gnu Make is to use '::' instead of ':' in all instances of the target, so it appends the clean checks. But that only works if all of them are done with '::' and the generated one doesn't use it. How else can I have the generated .a file removed with a Clean?
If you wish to be able to delete target which is not part of the current project (in your case: the third party library)

You can do this by creating an empty project of type 'Custom Makefile',

Follow theses steps:

1)Create new project of type 'Custom Makefile'
From: 'Workspace | New Project | (Categories) Others | Custom Makefile'

2)
Next, open the configuration manager from "Build | Configuration Manager"
It will show you a table with list of your projects + for each project it will show you its available 'configurations' (release, debug etc)

Make sure that 'Debug' is selected for all of the projects + the workspace configuration.
Do the same for the 'Release'

Basically, this manager allows you to decide which project configuration is selected when the *workspace* configuration changes.
Click OK and dismiss the configuration manager.

3)
Right click on your project and select 'Build Order'
Check the new 'custom makefile' project you created in step 1 and click. ( do this for all your configurations )

4)
Right click on the new 'custom makefile' project and open its settings dialog
Navigate to the "Customize | Custom Rules" , double click on the 'Clear' target and place your clean command
Optionally, you can also place a 'Build' target etc

Make sure you do this for both 'Debug' and 'Release'

Now, what we basically did it defining a 'relation' between Your project and the newly created one.
So whenver you hit F7 and build your project the 'custom makefile' project will be built first (the same for clean)

Here is a link from codelite's wiki:

http://www.codelite.org/LiteEditor/ConfigurationManager

HTH,
Eran

Re: Great Tool! Questions of course

Posted: Tue Jun 26, 2012 12:11 am
by jdarnold
Thanks, that seems to work pretty well.