D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Makefiles - mv with wildcard that may not match anything

 

Simon Williams wrote:
> James Fidell wrote:
>> Something like:
>>
>> clean:
>>      mkdir -p .backups
>>      -mv -f *~ .backups
> 
> Is there supposed to be a '-' in front of the mv line? If not, that 
> doesn't work, because -f on mv doesn't work like it does on rm.

Yes, there is supposed to be a '-' before the mv.  It causes make to
ignore the return code of mv, which achieves what you asked for if I
understand you correctly.

James

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html