Use install instead of cp

According to the explanation found here:
http://en.chys.info/2009/05/install-vs-cp-and-mmap/ , it is better to
use `install' than `cp'. This is because, supposedly, `cp' opens the
new file in write-only mode and just overwrites it, whereas `install'
unlinks it first and then replaces it, making sure that running
programs don't start acting strangely.
This commit is contained in:
Tom Willemsen 2012-05-27 22:56:17 +02:00
parent 905fa45ed2
commit 1b195b1562

View file

@ -7,6 +7,6 @@ baps1: main.o
main.o: main.c main.o: main.c
$(CC) -c main.c $(CC) -c main.c
install: baps1 install: baps1
cp baps1 $(INST_PATH)/baps1 install baps1 $(INST_PATH)/baps1
clean: clean:
rm baps1 *.o rm baps1 *.o