Skip to content
Browse files

Makefile: DESTDIR and --prefix support

  • Loading branch information...
1 parent 40e56cf commit a2ef72fe57e96f304dde24d93130ed1bedbf06a7 @wmark wmark committed Mar 22, 2010
Showing with 10 additions and 5 deletions.
  1. +8 −3 Makefile.in
  2. +2 −2 README.rst
View
11 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
View
4 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
-----

0 comments on commit a2ef72f

Please sign in to comment.
Something went wrong with that request. Please try again.