Makefile rule Topic is solved

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Makefile rule

Post by tfAteba »

Hi Giovanni,

I use vim to edit my files, so it create me backup files such as main.c~ for example.
I saw that when running the command make clean, those file are not deleted.
Can we add a rule to the makefile to do that?

Thanks,

Theo.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Makefile rule

Post by Giovanni »

Hi,

I prefer for the makefile to delete only what it generated during a build, people could want to keep their backups.

You could add a new rule fullclean to your Makefile after the inclusion of rules.mk.

Giovanni
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Makefile rule

Post by tfAteba »

Hi,

Ok, I understand ;). I will do that. I will also add the rule to flash my bord, like make program. So I don't have to write it every time I want to flash my MCU.

Thanks,

Theo.
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Makefile rule

Post by barthess »

@Theodore ATEBA
As Giovanni said it is not make's task. I use version control facilities for such job ("git clean -xdf" in my case).
SVN also able to clean working copy but I can not remember exact command.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Makefile rule

Post by tfAteba »

Hi Barthess,

Good alternative to the Makefile rule to clean the working directory.
I'm used to Git so I can use this possibility. I don't know SVN but don't worry ;).

Thanks for the clue.

Theo
Post Reply