Don't rely on /etc/init.d being OpenRC
[openresolv] / Makefile
index 1a205b8cfbd536332111ed67c209883b06ad80a1..d1a7c58f507e6c11887c892e107a1d2afedb341f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 1.0
 DESTDIR =
-PREFIX = /
+PREFIX =
 ROOT = $(DESTDIR)$(PREFIX)
 INSTALL = install 
 ETCDIR = $(ROOT)/etc/resolvconf
@@ -22,7 +22,7 @@ install:
        $(INSTALL) resolvconf $(BINDIR)
        $(INSTALL) libc dnsmasq named $(UPDATEDIR)
        $(INSTALL) -m 644 resolvconf.8 $(MANDIR)
-       if test "$(PREFIX)" "!=" "/"; then \
+       if test "$(PREFIX)" "!=" "/" && test -n "$(PREFIX)"; then \
                for x in $(BINDIR)/resolvconf $(UPDATEDIR)/libc $(UPDATEDIR)/dnsmasq $(UPDATEDIR)/named; do \
                sed -i.bak -e s':^PREFIX=.*:PREFIX="$(PREFIX)":' "$$x"; rm "$$x".bak; \
                done; \