What is the difference between shell commands "mv" and "-mv" in a makefile?

I came across a person who changed the command mvto -mvinside the makefile target. What is the difference?

%/install-stamp:                                                                                                           
        dh_testdir                                                                                                         
        dh_testroot                                                                                                        
        dh_prep -p$(subst _,-,$(a))-toolchain                                                                                       
        cp -rl $(r) debian/$(subst _,-,$(a))-toolchain                                                                     
        -mv debian/$(subst _,-,$(a))-toolchain/usr/bin/libgcc_s_sjlj-1.dll debian/$(subst _,-,$(a))-toolchain/usr/$(subst \
_,-,$(a))/bin                                                                                                              
        -mv debian/$(subst _,-,$(a))-toolchain/usr/lib/libiberty.a debian/$(subst _,-,$(a))-toolchain/usr/$(subst _,-,$(a)\
)/lib                                                                                                                      
        rm -f debian/$(subst _,-,$(a))-toolchain/usr/share/man/man1/dllwrap*                                               
        rm -f debian/$(subst _,-,$(a))-toolchain/usr/share/man/man7/fsf-funding*                                           
        rm -f debian/$(subst _,-,$(a))-toolchain/usr/share/man/man7/gfdl*                                                  
        rm -f debian/$(subst _,-,$(a))-toolchain/usr/share/man/man7/gpl*                                                   
        touch $(@)       
+3
source share
1 answer

Add a “-” before any command in the Makefile tells make not to stop working if the command returns a non-zero status. It’s basically “I don’t care if it fails.”

+8
source

Source: https://habr.com/ru/post/1774829/


All Articles