summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 11 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index e5d16bc..5dd9009 100644
--- a/Makefile
+++ b/Makefile
@@ -19,20 +19,21 @@ CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter
CPPFLAGS += -DSCRIPT_LOCATION='"$(pkglibexecdir)/parabolaweb-changepassword.real"'
targets = \
- $(DESTDIR)$(sbindir)/parabolaweb-changepassword \
- $(DESTDIR)$(sbindir)/parabolaweb-fcgi \
- $(DESTDIR)$(sbindir)/parabolaweb-reporead-inotify \
- $(DESTDIR)$(sbindir)/parabolaweb-update \
- $(DESTDIR)$(pkglibexecdir)/parabolaweb-changepassword.real \
- $(DESTDIR)$(systemddir)/parabolaweb.service \
- $(DESTDIR)$(systemddir)/parabolaweb-reporead-inotify.service
+ $(sbindir)/parabolaweb-changepassword \
+ $(sbindir)/parabolaweb-fcgi \
+ $(sbindir)/parabolaweb-reporead-inotify \
+ $(sbindir)/parabolaweb-update \
+ $(pkglibexecdir)/parabolaweb-changepassword.real \
+ $(systemddir)/parabolaweb.service \
+ $(systemddir)/parabolaweb-reporead-inotify.service
all: PHONY depends.txt $(notdir $(targets)) parabolaweb.conf
-install: PHONY $(targets) $(sysconffile)
+install: PHONY $(addprefix $(DESTDIR),$(targets) $(pkgconffile))
uninstall: PHONY
- $(RM) $(targets) $(sysconffile)
+ $(RM) $(addprefix $(DESTDIR),$(targets) $(pkgconffile))
+ rmdir -p -- $(wildcard $(sort $(dir $(addprefix $(DESTDIR),$(targets) $(pkgconffile))))) 2>/dev/null || true
clean: PHONY
$(RM) $(notdir $(targets)) depends.txt
@@ -59,7 +60,7 @@ depends.txt: list-depends depends_static.txt
$(DESTDIR)$(sbindir)/parabolaweb-changepassword: parabolaweb-changepassword
install -Dm6755 $< $@
-$(DESTDIR)(pkgconffile): parabolaweb.conf
+$(DESTDIR)$(pkgconffile): parabolaweb.conf
install -Dm644 $< $@
.DELETE_ON_ERROR: