aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--Makefile.config1
-rw-r--r--Makefile.local6
3 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 19b51491..436dacfc 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,9 @@ override LDFLAGS += `pkg-config --libs glib-2.0 gmime-2.4 talloc` \
include Makefile.local
include lib/Makefile.local
+# And get user settings from the output of configure
+include Makefile.config
+
%.o: %.cc
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@
diff --git a/Makefile.config b/Makefile.config
new file mode 100644
index 00000000..657316e4
--- /dev/null
+++ b/Makefile.config
@@ -0,0 +1 @@
+prefix = /usr
diff --git a/Makefile.local b/Makefile.local
index 6573f634..605a3af1 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -24,13 +24,13 @@ notmuch.1.gz:
gzip --stdout notmuch.1 > notmuch.1.gz
install: all notmuch.1.gz
- for d in $(DESTDIR)/usr/bin/ $(DESTDIR)/usr/share/man/man1 \
+ for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \
$(DESTDIR)/etc/bash_completion.d/ ; \
do \
install -C -d $$d ; \
done ;
- install -C notmuch $(DESTDIR)/usr/bin/
- install -C notmuch.1.gz $(DESTDIR)/usr/share/man/man1/
+ install -C notmuch $(DESTDIR)$(prefix)/bin/
+ install -C notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
install -C notmuch-completion.bash \
$(DESTDIR)/etc/bash_completion.d/notmuch