aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0324d65..7db373d 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,10 @@ $(HTML_FILES): $(BUILD_DOCDIR)/%.html: $(srcdir)/doc/%.md $(HTML_TEMPLATE)
doc: manual html
+INSTALL ?= install
+INSTALL_PROGRAM ?= $(INSTALL)
+INSTALL_DATA ?= $(INSTALL) -m0644
+
prefix ?= $(DESTDIR)
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
@@ -61,12 +65,12 @@ mandir ?= $(datarootdir)/man
man1dir ?= $(mandir)/man1
install: all
- install -m0755 -vDt $(bindir) $(srcdir)/interimap $(srcdir)/pullimap
- install -m0644 -vDT $(srcdir)/lib/Net/IMAP/InterIMAP.pm $(datarootdir)/perl5/Net/IMAP/InterIMAP.pm
- install -m0644 -vDt $(man1dir) $(BUILD_DOCDIR)/interimap.1 $(BUILD_DOCDIR)/pullimap.1
- install -m0644 -vDt $(datarootdir)/doc/pullimap $(srcdir)/pullimap.sample
- install -m0644 -vDt $(datarootdir)/doc/interimap $(srcdir)/interimap.sample $(srcdir)/doc/getting-started.md $(srcdir)/doc/multi-account.md README
- install -m0644 -vDt $(libdir)/systemd/user $(srcdir)/*.service
+ $(INSTALL_PROGRAM) -vDt $(bindir) $(srcdir)/interimap $(srcdir)/pullimap
+ $(INSTALL_DATA) -vDT $(srcdir)/lib/Net/IMAP/InterIMAP.pm $(datarootdir)/perl5/Net/IMAP/InterIMAP.pm
+ $(INSTALL_DATA) -vDt $(man1dir) $(BUILD_DOCDIR)/interimap.1 $(BUILD_DOCDIR)/pullimap.1
+ $(INSTALL_DATA) -vDt $(datarootdir)/doc/pullimap $(srcdir)/pullimap.sample
+ $(INSTALL_DATA) -vDt $(datarootdir)/doc/interimap $(srcdir)/interimap.sample $(srcdir)/doc/getting-started.md $(srcdir)/doc/multi-account.md README
+ $(INSTALL_DATA) -vDt $(libdir)/systemd/user $(srcdir)/*.service
uninstall:
rm -vf -- $(bindir)/interimap $(man1dir)/interimap.1 $(libdir)/systemd/user/interimap*.service