Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 1 file changed
  • 0 comments
  • 1 contributor
May 27, 2012
Tom Willemse 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.
1b195b1
Tom Willemse Add a little bit of whitespace a94a591
Tom Willemse Add uninstall rule
It might or might not be non-standard, but I hate having to figure out
which files should be removed to uninstall something, can we please
have this?
c783d74

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  src/Makefile
7  src/Makefile
@@ -6,7 +6,12 @@ baps1: main.o
6 6
 
7 7
 main.o: main.c
8 8
 	$(CC) -c main.c
  9
+
9 10
 install: baps1
10  
-	cp baps1 $(INST_PATH)/baps1
  11
+	install baps1 $(INST_PATH)/baps1
  12
+
  13
+uninstall:
  14
+	rm $(INST_PATH)/baps1
  15
+
11 16
 clean:
12 17
 	rm baps1 *.o

No commit comments for this range

Something went wrong with that request. Please try again.