summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-02 23:30:27 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-02 23:30:27 +0200
commitc2973ead93871b63a896c5282922e3454ff1e338 (patch)
treea25d3e9e87f8737de068afaba66a5f94bb0bea53
parentfdbcd3937ed6ec40cc6e8336a2e3396540296e57 (diff)
Makefile style fixes
-rw-r--r--.gitignore1
-rw-r--r--Makefile24
2 files changed, 16 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..84c048a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/build/
diff --git a/Makefile b/Makefile
index 164a3c2..8ad07d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,27 @@
+prefix = /usr/local
+
build/apt-why.1: bin/apt-why
mkdir -p build
pod2man $< > $@
-install:
- install -m 755 bin/apt-why /usr/local/bin
- install -m 644 -D build/apt-why.1 /usr/local/share/man/man1/apt-why.1
+install: build/apt-why.1
+ mkdir -p $(prefix)/bin $(prefix)/share/man/man1
+ cp bin/apt-why $(prefix)/bin
+ cp build/apt-why.1 $(prefix)/share/man/man1
+ chmod 755 $(prefix)/bin/apt-why
+ chmod 644 $(prefix)/share/man/man1/apt-why.1
install-completion:
- install -m 644 provides/zsh/completions/_apt-why \
- /usr/local/share/zsh/site-functions
+ mkdir -p $(prefix)/share/zsh/site-functions
+ cp provides/zsh/completions/_apt-why $(prefix)/share/zsh/site-functions
+ chmod 644 $(prefix)/share/zsh/site-functions/_apt-why
clean:
- $(RM) -r build
+ rm -rf build
uninstall:
- $(RM) /usr/local/bin/apt-why
- $(RM) /usr/local/share/man/man1/apt-why.1
+ rm -f $(prefix)/bin/apt-why
+ rm -f $(prefix)/share/man/man1/apt-why.1
uninstall-completion:
- $(RM) /usr/share/zsh/functions/Completion/Debian/_apt-why
+ rm -f $(prefix)/share/zsh/site-functions/_apt-why