As announced in
this thread I post a patch for the C::B build system, that improves the using of custom makefiles.
I attach two patches, one for linux and one for windows.
The contents are identical, but the windows patch is created with tortoise-svn and can easily applied with it, while the linux patch is created with standard diff.
Before use you have to unpack the patch with 7-zip.
To apply the linux version, change directory to the root directory of the C::B sources (the one that contains configure.in) and type
patch -p1 < [path/to/the/patchfile/use_make_20090121-3.patch]
without square brackets and with the correct path of course.
To make sure it applies correctly you can first try it with the
--dry-run option set, so nothing will be really changed.
The windows version can be applied from within with tortoise's context menu.
After patching the
CodeBlocks[-unix].cbp and the
ContripPlugins[-unix].workspace have to be build.
A rebuild or make clean should not be necessary, but some sdk-files are changed and without a new build C::B might crash.
After running
[./]update[.bat] the new version should be usable.
If you compile it from within C::B and want to start it from inside the IDE, you also have to run
[./]update[.bat], because I changed two .
xrc-files, that would otherwise not be copied to the right place.
Cleaning, building and rebuilding of workspaces with and without custom makefiles should work as expected.
They can also be mixed or depend on each other.
Pre- and post-build steps for custom makefiles are also available.
The makefile has to be in the projects root dir and has to be set in the projects properties.
You still have to setup the parameters for the makefiles in
Build options -> "Make" commands correctly. In most cases (on linux) it is enough to remove the
$target, or use a targetname that is also used inside the makefile.
The last (new) command on the
"Make" commands tab is used to test whether the project needs to be a rebuild.
The
-q (question) parameter works for gnu make, I don't know the parameter for the make executables of other compilers. You have to figure it out yourself.
I normally do not use custm makefiles, so I only tested it with some of the wxWidgets samples and a simple wizard-generated
.cbp-project.
Any questions, suggestions or whatever is not only welcome, but needed to make sure it works without breaking the standard build-system.
EDIT:removed the patches, see next post, sorry for the inconvenience.