If you configure a project to use a custom Makefile it will use this command for its 'clean' target:
$make -f $makefile clean$target
The target for make most commonly used is:
make clean
I suggest setting the default clean command to:
$make -f $makefile clean
I cannot find anywhere to configure this as the default so guess it is hard coded.
See attached patch to correct this issue.
I think this patch is not correct. What I think it does is: when you do clean from the C::B ui it would execute the "make clean mytarget" which would tell make to execute both "clean" and "mytarget" targets, which is not what is expected.
Do you agree with this analysis?
If you don't like the defaults you can always edit them after project creation.
If you create many custom makefile projects you can create a custom template or edit the existing one.
But I don't think this is the correct fix for your problem.
You are right, I made a mistake with the patch which I realised when I tried to use it yesterday. Find attached an updated patch to do what I intended, i.e. do not add target to clean (or distclean). Normal makefile clean target is called "clean" so this seems like the most appropriate default setting. I am familiar with how to create custom templates and wizards but this issue relates to the best defaults to avoid users needing to resort to such measures.