Author Topic: custom Makefile and build->clean doesn't work  (Read 11907 times)

Offline jlac

  • Single posting newcomer
  • *
  • Posts: 7
custom Makefile and build->clean doesn't work
« on: February 18, 2009, 12:27:03 pm »
Hi,

With the nightly build 29/01/2009 svn 5456 on winXp
menu Build -> Build is ok (call my makefile)
but
menu Build -> Clean don't clean my files, it doesn't call my makefile but the other cleaner:
Quote
-------------- Clean: clean in pjttest ---------------

Error cleaning "pjttest - clean"
Done.
This is occur when the compiler selected is Cygwin or GNU GCC.

Any ideas ?


embedded real-time signal processing software engineer.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: custom Makefile and build->clean doesn't work
« Reply #1 on: February 18, 2009, 12:39:34 pm »
It calls your makefile, but the make.exe returns an error.

The custom-makefile handling and log-output has changed, see here: http://forums.codeblocks.org/index.php/topic,9966.0.html.

I will change the logging of custom-makefile clean to output the errors, if you use full commandline logging (maybe this feature will be optional).

At the moment, you can check if the make clean command in the build options of your project is correct.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: custom Makefile and build->clean doesn't work
« Reply #2 on: February 18, 2009, 01:05:38 pm »
I just changed it in trunk (r5457).

Custom-makefile clean always logs output, if full commandline logging is turned on ("Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab) -> Compiler logging" is switched to "Full commandline").

Offline jlac

  • Single posting newcomer
  • *
  • Posts: 7
Re: custom Makefile and build->clean doesn't work
« Reply #3 on: February 18, 2009, 02:00:26 pm »
with 'GNU gcc compiler' and 'Full commandline' actived I have:
For Build:
Quote
-------------- Build: all in pjttest ---------------

Running command: mingw32-make.exe -f Makefile all
gcc -g -Wall pjttest.c -o pjttsest
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings

For Clean:
Quote
-------------- Clean: all in pjttest ---------------

Error cleaning "pjttest - all"
Done.
make.exe isn't call ...
embedded real-time signal processing software engineer.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: custom Makefile and build->clean doesn't work
« Reply #4 on: February 18, 2009, 02:33:52 pm »
At the moment, you can check if the make clean command in the build options of your project is correct.

I just changed it in trunk (r5457).

Custom-makefile clean always logs output, if full commandline logging is turned on ("Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab) -> Compiler logging" is switched to "Full commandline").

Please read my posts carefully.

You either have to compile C::B yourself, or wait for the next nightly.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: custom Makefile and build->clean doesn't work
« Reply #5 on: February 18, 2009, 03:46:40 pm »
@Jens :

don't do pre-build commands during a clean. Agreed. :-)
But I would say don't do post build commands during a clean ??
And have this behavior also when it's the regular CB build system (so not makefiles).

I bumped into such an issue when cleaning my unit test project/target. It's post build is to run the unit test (pretty simple : $exe_output. But in a clean it then complains that the exe can not be found ;-)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: custom Makefile and build->clean doesn't work
« Reply #6 on: February 18, 2009, 06:10:57 pm »
@Jens :

don't do pre-build commands during a clean. Agreed. :-)
But I would say don't do post build commands during a clean ??
And have this behavior also when it's the regular CB build system (so not makefiles).

I bumped into such an issue when cleaning my unit test project/target. It's post build is to run the unit test (pretty simple : $exe_output. But in a clean it then complains that the exe can not be found ;-)

I stumbled over this issue also some weeks ago, but I forgot it  :oops: .
I think it slipped in, because the changes are a mix of a patch from a user and my changes, but I don't use C::B for real programming at the moment (only as editor for html and asp-scripts).

I will fix it and commit a change (most likely this evening).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: custom Makefile and build->clean doesn't work
« Reply #7 on: February 18, 2009, 10:23:37 pm »
Since revision 5458 pre- and postbuild-steps (per project and per target) are not used if we only clean the project.