summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW-Mark Kubacki <wmark@hurrikane.de>2010-03-22 15:41:20 +0100
committerW-Mark Kubacki <wmark@hurrikane.de>2010-03-22 15:41:20 +0100
commita2ef72fe57e96f304dde24d93130ed1bedbf06a7 (patch)
treedcc20657275e100b8bf97f4c396e79b9a3a94a09
parent40e56cf36025451c7975d6bcf4f326f21a7e70a6 (diff)
downloadfcgiwrap-a2ef72fe57e96f304dde24d93130ed1bedbf06a7.tar.xz
fcgiwrap-a2ef72fe57e96f304dde24d93130ed1bedbf06a7.zip
Makefile: DESTDIR and --prefix support
-rw-r--r--Makefile.in11
-rw-r--r--README.rst4
2 files changed, 10 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 6f3768c..7a6904b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,10 +1,11 @@
+targetdir = $(DESTDIR)@prefix@@sbindir@
+
.PHONY: clean distclean
all: fcgiwrap
install: all
- [ -f /usr/local/bin/fcgiwrap ] && mv /usr/local/bin/fcgiwrap /usr/local/bin/fcgiwrap~
- cp fcgiwrap /usr/local/bin
- rm /usr/local/bin/fcgiwrap~
+ install -d -m 755 $(targetdir)
+ install -m 755 fcgiwrap $(targetdir)
fcgiwrap: fcgiwrap.c
@CC@ @AM_CFLAGS@ fcgiwrap.c -o fcgiwrap -lfcgi
@@ -17,3 +18,7 @@ clean:
distclean: clean
-rm -rf config.log config.status autom4te.cache
-rm -f configure Makefile
+
+#>+ 21
+uninstall:
+ rm -f $(targetdir)/fcgiwrap
diff --git a/README.rst b/README.rst
index 390d104..4302ab4 100644
--- a/README.rst
+++ b/README.rst
@@ -32,8 +32,8 @@ To install::
make
make install
-*fcgiwrap* will be copied to ``/usr/local/bin/fcgiwrap``.
-You can omit ``make install`` and install it e.g. to ``/usr/sbin`` by hand.
+*fcgiwrap* will be copied to ``/usr/local/sbin/fcgiwrap`` if you did not set
+``--prefix`` for configure or ``DESTDIR`` for the makefile.
usage
-----