Bug #15085 2009-01-20 21:19

nacitar

Workspace (re)build/clean commands do not function properly

Layout:
  Workspace
  - Project 1 (makefile project)
  - Project 2 (makefile project)
  - Project 3 (makefile project)

EXPECTED:

Build Workspace ==> Build project 1, build project 2, build project 3

Rebuild Workspace ==> Rebuild project 1, rebuild project 2, rebuild project 3

Clean Workspace ==> Clean project 1, clean project 2, clean project 3.


BEHAVIOR:
Codeblocks assumes you are not using a custom makefile project, in the case of the workspace build commands.  What happens is the following:

Build/Rebuild Workspace ==> Build/rebuild project 1 using the custom makefile, try to build/rebuild project 1 using normal build system (should NOT happen, as this is a custom makefile project!), if it didn't fail (and it likely will, as it's a makefile project for a reason), it'll do the same thing for project 2 and then 3.

A workaround the that behavior is to create a target called "None" or something similar, set it's build commands to something like "echo DO NOT BUILD THIS TARGET; return 1" if on a linux box at least, and only add your source files to that target (that way you have the convenient file listing, and you're building using the makefile).  However, even with this workaround, the headers that say what project is being build and what target is being built will be output _after_ the build log for the makefile execution, making the headers into footers, effectively.

Now, what's really interesting is the behavior of clean.  Unlike build/rebuild workspace, clean workspace only cleans the first project.  That's it.  No headers or anything are output.

This is a simple fix, just make build/rebuild/clean workspace into the equivalent of build/rebuild/clean project 1, then 2, then 3.. whatever order is in the workspace.  This is how I assumed it worked, but clearly that's not the case, as I can build and clean my projects fine normally, but not with the workspace commands without workarounds.  And, no workaround exists to make clean workspace function properly.  It's just broken.
Category
Application::WrongBehaviour
Group
 
Status
Closed
Close date
2009-01-29 23:38
Assigned to
jenslody
nacitar 2009-01-20 21:20

Duplicate of Bug #14644, just noticed... more information is here than in the other, though.

jenslody 2009-01-29 23:38

This bug is now fixed in HEAD.

Thank you for reporting it.