Menu

#593 Custom Makefile default clean command not standard

Undefined
open
nobody
None
Undefined
2018-11-16
2018-01-05
Walt
No

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.

Discussion

  • Walt

    Walt - 2018-11-15

    See attached patch to correct this issue.

     
  • Teodor Petrov

    Teodor Petrov - 2018-11-15

    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.

     
  • Walt

    Walt - 2018-11-16

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.