Author Topic: An option to clean a non-project, just a file?  (Read 10164 times)

m00

  • Guest
An option to clean a non-project, just a file?
« on: December 28, 2005, 07:34:10 pm »
When I wanted to open or create a new file, not a project. I would like to know if it is possible to clean when I use the "Compile current file"? Clean to remove the binary and *.o files.

foo <-- delete (clean)
foo.c
foo.o <-- delete (clean)

Thanks.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: An option to clean a non-project, just a file?
« Reply #1 on: December 28, 2005, 07:58:38 pm »
Please submit a feature request at our sourceforge page. Thank you :)

m00

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #2 on: December 28, 2005, 09:31:59 pm »
Ok, it means that this feature is not in C::B yet and I will submitting a request. Thanks.

grv575

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #3 on: December 28, 2005, 10:16:36 pm »
Isn't that extra clutter for the menus?

Shouldn't the default behavior of compile current file instead be changed to first remove file.o and then compile?  It's only 1 file so no gain from build management (incremental compilation) and I'm sure if file.o exists and the user hit compile they are expecting to recompile, not get a message saying project is up to date (usually).  Maybe then change the name to build current file or...?

What are people thoughts on this one (know full well this could be 'holy war' type preference but just curious about what the behavior most people agree on)?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: An option to clean a non-project, just a file?
« Reply #4 on: December 28, 2005, 10:36:09 pm »
Revision 1610 implements "Build", "Build and run", "Run", "Rebuild" and "Clean" compiler actions for single files (without project).
Be patient!
This bug will be fixed soon...

m00

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #5 on: December 28, 2005, 10:57:36 pm »
Revision 1610 implements "Build", "Build and run", "Run", "Rebuild" and "Clean" compiler actions for single files (without project).
Your awsome, thanks!  :D

grv575

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #6 on: December 28, 2005, 11:11:26 pm »
so aren't build & compile current file redundant now?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: An option to clean a non-project, just a file?
« Reply #7 on: December 29, 2005, 01:23:49 am »
so aren't build & compile current file redundant now?

No. For single files (w/o project) they behave the same, true. But for projects, "Build" builds the project while "Compile file" just compiles the active file (i.e. generates an object file from it).
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #8 on: December 29, 2005, 01:39:31 am »
I think grv575 is refering to the case of single files (w/o project), wouldn't be wise to disable either Build or Compile file, if they do the same action (to remove redundance I suppose).

grv575

  • Guest
Re: An option to clean a non-project, just a file?
« Reply #9 on: December 29, 2005, 02:57:01 am »
Well not a big deal.  Makes the most sense as it is I think since if you disable one then the meaning of rebuild etc for a single file becomes confusing.