PClean command.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PClean command.

720 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP86278 on Mon Mar 23 04:01:04 MST 2015
I want to implement my own PClean command to clean the reference project and Delete all Debug and Release folder and customize with my ID.

1) Where is clean command defined?
2)How can I access and modify it ?

Thanks and Regards
Chandan
0 Kudos
Reply
2 Replies

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Mar 23 06:21:52 MST 2015
Simplest way to do this is to create your own Makefile that will be called only on the clean command.

To do this:
- Call it something like makefile.clean and put it in the root of your project.
- Edit the project properties, Click on the C/C++ Build and then the Behavior tab. Change the Clean command to
-f ../makefile.clean


Now, whenever a clean is performed, your makefile will be called - and you can do anything you want.
0 Kudos
Reply

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Mar 23 04:42:34 MST 2015
Clicking the "Clean" quickstart button invokes the build process, but instead of invoking the auto generated makefile
for a target "all" it selects target "clean".

You can look at the makefile in the debug/release directories to see what it does, but it is usless to edit this to add
any of your own operations because they will be lost when the makefile is next regenerated.

So, in the project properties (somewhere, I can't be bothered to see exactly where) you can change ...
(a) either to use your own makefile (which you must supply and which will not get shafted by the auto makefile
generation) I think you untick 'Managed makefile' box or similar. You can probably COPY as a new file the current
auto generated makefile and fiddle with it. (Consolidate into a single file for a start!)
or (b) Maybe the 'clean' section allows 'post build' steps just as the build does.

Or maybe (c) tell it to run an external program, but that might be for build only.

I never build via the IDE, so the details are a bit vague for me. Try the built in help, you may get lucky, I never have.

Anyway, I am sure that there IS a way, cheers, Mike.
0 Kudos
Reply