]> git.notmuchmail.org Git - notmuch/commitdiff
Makefile: Change default install prefix from /usr to /usr/local
authorCarl Worth <cworth@cworth.org>
Tue, 17 Nov 2009 21:05:16 +0000 (13:05 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 17 Nov 2009 21:05:16 +0000 (13:05 -0800)
We'll be a much more polite package this way. And the user can change
the prefix by editing Makefile.config. Still to be done is to make
configure write out Makefile.config and to add a --prefix option to
configure.

Makefile
Makefile.config [new file with mode: 0644]
Makefile.local

index 19b51491e1154bc33c61173d03effdfdb51d20c0..436dacfc4c6318e76f076c007771afe34153f52f 100644 (file)
--- 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
 
 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 $@
 
 %.o: %.cc
        $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@
 
diff --git a/Makefile.config b/Makefile.config
new file mode 100644 (file)
index 0000000..657316e
--- /dev/null
@@ -0,0 +1 @@
+prefix = /usr
index 6573f634b3b83ce04283fc49a2dd78d05fc16468..605a3af1cdb04b9994da36c2be3e7213fe4668a2 100644 (file)
@@ -24,13 +24,13 @@ notmuch.1.gz:
        gzip --stdout notmuch.1 > notmuch.1.gz
 
 install: all 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 ;
                $(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
 
        install -C notmuch-completion.bash \
                $(DESTDIR)/etc/bash_completion.d/notmuch