$(call quiet,gzip) --stdout $^ > $@
install: all notmuch.1.gz
- for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/lib/ \
+ for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(libdir)/ \
$(DESTDIR)$(prefix)/include/ $(DESTDIR)$(prefix)/share/man/man1 ; \
do \
install -d $$d ; \
done ;
install notmuch $(DESTDIR)$(prefix)/bin/
- install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/
+ install lib/$(SONAME) $(DESTDIR)$(libdir)/
install lib/notmuch.h $(DESTDIR)$(prefix)/include/
- ln -sf $(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so
+ ln -sf $(SONAME) $(DESTDIR)$(libdir)/libnotmuch.so
install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
ifeq ($(MAKECMDGOALS), install)
@echo ""
# Set the defaults for values the user can specify with command-line
# options.
PREFIX=/usr/local
+LIBDIR=${PREFIX}/lib
usage ()
{
command line.
--prefix=PREFIX Install files in PREFIX [$PREFIX]
+ --libdir=LIBDIR Install libraries in LIBDIR [$LIBDIR]
By default, "make install" will install the resulting program to
$PREFIX/bin, documentation to $PREFIX/share, etc. You can
exit 0
elif [ "${option%%=*}" = '--prefix' ] ; then
PREFIX="${option#*=}"
+ elif [ "${option%%=*}" = '--libdir' ] ; then
+ LIBDIR="${option#*=}"
else
echo "Unrecognized option: ${option}."
echo "See:"
# The prefix to which notmuch should be installed
prefix = ${PREFIX}
+# The directory to which notmuch libraries should be installed
+libdir = ${LIBDIR}
+
# The directory to which emacs lisp files should be installed
emacs_lispdir=${emacs_lispdir}