Commit graph

170 commits

Author SHA1 Message Date
David Bremner
b71405c9a4 build system: Check that python bindings have consistent version when releasing
Thanks to Sebastian Spaeth breaking out version.py, this can be done
without loading notmuch.py, or using sed. version.py is not (yet)
autogenerated because it seems more important to minimize the
differences between the tagged version and the tarball.
2011-09-05 08:47:48 -03:00
David Bremner
839b7f20f6 build-system: Add pre-release target
This is a lighter weight version of the release target, intended to
support uploading release candidates to Debian.

As a side effect, filter ~ out of VERSION to make tag names.
2011-07-29 18:56:52 +02:00
David Bremner
2d69aba586 build-system: tag debian-version as part of the release target
This allows, e.g. gitpkg debian/0.x-1 to do the right thing.  It also
helps enforce the convention that Debian upload -1 is identical to the
release tarball.
2011-07-17 11:20:51 -03:00
David Bremner
0897209f4d build-system: update version check to support non-native packages.
We could be a bit more flexible about this and support optional Debian
versions, but for the moment, we pick a policy and stick to it.
2011-07-17 11:04:08 -03:00
David Bremner
466f3b57aa build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD
This supports both testing and use by non-upload privileged
users. Along with previous commits in the series, this lets one do a
dry run of the release process and created a tarball, signature file,
and release announcement to inspect before uploading.
2011-07-17 10:59:41 -03:00
David Bremner
9b0dfd11c5 build-system: use signed tag to make tar file, if available.
This as the advantage that "make VERSION=n.m dist" will work correctly
even if the wrong branch happens to be checked out.
2011-07-17 10:59:41 -03:00
David Bremner
60173feb06 build-system: tag earlier in the release process.
If tagging fails, we really don't want to upload tarballs.
2011-07-17 10:59:41 -03:00
David Bremner
939c91b7ef build-system: remove use of git-buildpackage, dput. Add pristine-tar.
The previous setup was dependent on the git-buildpackage configuration
to find the resulting tar file, and consequently a bit fragile.

We use pristine-tar instead to save a checksum-identical copy of the
tar file. This will also faciliate "non-native" debian packages, if
desired.

dput again depends on the local configuration, and mainly is a bit too
brave for me to do automatically.
2011-07-17 10:59:41 -03:00
David Bremner
9fb9fb2986 build-system: run make clean before testing.
The reasoning is that we might have some error in the build system
that causes something not to be rebuilt; this would potentially have
the tests run on the wrong version of the code.
2011-07-17 10:59:41 -03:00
David Bremner
2e13698812 build-system: replace use of ssh with wget for checking the website
The idea is to see if the version we are already releasing exists on
the notmuch website. Using wget allows more people to run this target,
and also allows people with ssh access to run it without access to
their keys.
2011-07-17 10:59:41 -03:00
Daniel Kahn Gillmor
5143e5e840 Use stock GMimeSession by default
Our use of GMimeSession was unneeded boilerplate, and we weren't doing
anything with it.  This simplifies and clarifies that assumption.

If we want to do anything fancier later, the examples in the gmime
source are a reasonable source to work from in defining a new
GMimeSession derivative.

Since GMimeSession is going away in GMime 2.6, though, i don't
recommend using it.
2011-06-03 17:42:54 -07:00
Jameson Graef Rollins
8b18efe171 Add signature verification of PGP/MIME-signed parts with --verify.
This is primarily for notmuch-show, although the functionality is
added to show-message.  Once signatures are processed a new
part_sigstatus formatter is emitted, and the entire multipart/signed
part is replaced with the contents of the signed part.

At the moment only a json part_sigstatus formatting function is
available.  Emacs support to follow.

The original work for this patch was done by

  Daniel Kahn Gillmor <dkg@fifthhorseman.net>

whose help with this functionality I greatly appreciate.
2011-05-27 16:22:00 -07:00
Carl Worth
4f926e140f notmuch: Implement search-tags as an alias for "search --output=tags *"
Ever since we added support for "notmuch search --output=tags" the
"notmuch search-tags" command has been redundant. The recent addition
of alias support makes it easy to drop the explicit search-tags
command in favor of a simple alias that runs "notmuch search
--output=tags *".

So there's no longer any documentation of the search-tags command, but
existing scripts will not break at all.
2011-05-24 12:19:18 -07:00
Carl Worth
3e4a9d60a9 build: Add support for non-source-directory builds.
Such as:

     mkdir build
     cd build
     ../configure
     make

This is implemented by having the configure script set a srcdir
variable in Makefile.config, and then sprinkling $(srcdir) into
various make rules. We also use vpath directives to convince GNU make
to find the source files from the original source directory.
2011-03-09 15:10:03 -08:00
Carl Worth
1a915d1b38 Makefile: Quote variables used as filenames in shell commands
This allows support for filenames with spaces in them.
2011-01-26 23:36:52 +10:00
Cédric Cabessa
26b4cc4aad configure: add options to disable emacs/zsh/bash and choose install dir.
add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose
installation dir for bash/zsh completion files

Make some features optional:
  --without-emacs / --with-emacs=no do not install lisp file
  --without-bash-completion / --with-bash-completion=no  do not install bash
files
  --without-zsh-completion / --with-zsh-completion=no do not install zsh files
By default, everything is enabled. You can reenable something with
  --with-feature=yes
2011-01-26 22:30:32 +10:00
Carl Worth
122539a57b Makefile: Move the -Wl,-as-needed option earlier in the command line.
This option wasn't having the desired effect, and sure enough, the
documentation states that it only affects the linking of libraries
that appear after this option on the command line. So put it early for
the desired effect.
2010-11-01 23:24:44 -07:00
Carl Worth
c81cecf620 lib: Add GCC visibility(hidden) pragmas to private header files.
This prevents any of the private functions from being leaked out
through the library interface (at least when compiling with a
recent-enough gcc to support the visibility pragma).
2010-11-01 22:35:48 -07:00
Carl Worth
ffae2dc9da Makefile: Build library with -Wl,--as-needed
Previously, we were building the final binary with this option, but not
the library. The library can benefit from it as well, (as pointed out
by Debian's lintian).
2010-11-01 16:52:22 -07:00
Carl Worth
6b9a717c26 configure: Add a check for the -Wl,--as-needed flag.
This fits with our general build philosophy of checking at configure
time for desired support, (rather than putting platform-specific
conditionals into our Makefiles).
2010-10-30 13:20:33 -07:00
Felipe Contreras
73fbce61d7 build: only link to what we really use
At least linux has the -Wl,--as-needed option.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-10-30 13:15:51 -07:00
Carl Worth
8753b9defa configure: Test for flag to set rpath
This is better than the previous approach which had a hardcoded Linux-specific
value in the Makefile.
2010-10-30 13:15:00 -07:00
Carl Worth
0b4474f4fa Makefile: Fix notmuch binary to directly link against Xapian and GMime.
Without this, trying to link with the gold linker would fail, (which meant
that notmuch could not be compiled out of the box on recent Fedora, nor
even on Debian when the binutils-gold package is installed).
2010-10-29 14:32:48 -07:00
Carl Worth
e6ba2c63c9 test: Fix test suite to integrate with our non-recursive Makefile system.
This avoids "make test" emitting messages from three (3!) recursive
invocations of make. We change the invocations of the tests themselves
to occur directly from the shell script rather than having the shell
script invoke make again and using wildcards in the Makefile.
2010-09-17 12:16:10 -07:00
Carl Worth
d64d0cc8d9 make install: Run ldconfig or install a DT_RUNPATH in binary as appropriate.
Various users were confused as to why they couldn't run notmuch
immediately after "make install", (with linker errors saying that
libnotmuch.so could not be found). The errors came from two different
causes:

1. The user had installed to a system library directory, but had not
   yet run ldconfig.

2. The user had installed to some non-system directory, and had not
   set the LD_LIBRARY_PATH variable.

With this change we fix both problems (on Linux) without the user
having to do anything additional. We first use ldconfig to find the
system library directories. If the user is installing to one of these,
then we run ldconfig as part of "make install".

For case (2) we use the -rpath and --enable-new-dtags linker options
to install a DT_RUNPATH entry in the binary. This entry tells the
dynamic linker where to find libnotmuch. Without the
--enable-new-dtags option only a DT_RPATH option would be installed,
(which has the drawback of not allowing any override with the
LD_LIBRARY_PATH variable).

Distributions (such as Debian and Fedora) don't want to see binaries
packaged with a DT_RPATH or DT_RUNPATH entry. This should be avoided
automatically as long as the packages install to standard locations,
(such as /usr/lib).
2010-06-04 16:52:56 -07:00
Carl Worth
1d528f890a Makefile: Improve the "what to do now" message from "make install"
This was already telling the user how to run notmuch within emacs, but
not how to just run the notmuch command-line interface, (which, as it
turns out, is a prerequisite for running the emacs interface anyway).

So add a small paragraph here.
2010-06-01 10:51:42 -07:00
Carl Worth
e6d20b7b8f make release: Add Debian package building and upload
Finally, a single button to push to do all the uploading.
2010-04-16 13:20:22 -07:00
Carl Worth
80240877f8 make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these
files is canonical and the other is generated from it. Until then, add
this check to the release process to avoid a skewed release being
shipped.
2010-04-16 13:00:35 -07:00
Carl Worth
9b065ff3b2 Makefile: Avoid complaining about .first-build-message not existing
This cleans up a few spurious warnings from the build.
2010-04-16 12:10:23 -07:00
Carl Worth
b068f1cc84 Fix final link of notmuch binary to use C compiler if possible.
On Linux, a C program that depends on a C library which in turn
depends on a C++ can be linked with the C compiler, (avoiding a direct
link from the program to the C++ runtime libraries).

Other platforms with less fancy linkers need to use the C++ compiler
for this linking.
2010-04-16 11:51:56 -07:00
Carl Worth
b8f0646931 Makefile: Fix conditionals to avoid calling git when no .git is present
Otherwise, building from a tar-file snapshot or release caused a bunch
of error messages from unnecessary git invocations.
2010-04-16 11:34:48 -07:00
Carl Worth
c41a6bb786 Makefile: Add a top-level "make snapshot" target.
Useful for verifying that our tar-file creation works. The tar-file
name can't easily be used as a target directly since it depends on the
current git revision.
2010-04-16 11:34:48 -07:00
Carl Worth
5999ff8d3c Makefile: Rework the version checks slightly.
Theese were previously pointing to "make VERSION=X.Y release", but
we've recently changed to an alternate scheme involving the updated
version in a file named "version".
2010-04-16 11:34:48 -07:00
Carl Worth
b7dc24298d Makefile: Add an explicit version file to the repository.
We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).

To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).

Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.
2010-04-16 11:34:48 -07:00
Carl Worth
4906f6b9ae make release: Don't print the release message on stdout.
It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.
2010-04-16 08:33:31 -07:00
Carl Worth
ff13111cf3 Makefile: Fix "make release" to print the current release announcement.
This was accidentally hard-coded to always print the 0.1 NEWS blurb.
2010-04-16 08:31:46 -07:00
Carl Worth
00263dd1a9 make release: Enforce a clean source tree before release.
Where by clean, we check that no files are known to git to be
modified.
2010-04-15 20:14:54 -07:00
Carl Worth
2475afcf0d make release: Provide a kinder message when VERSION is forgotten.
I'm unlikely to always remember to pass VERSION=X.Y so it's nice for
make release to remind me.
2010-04-15 18:40:08 -07:00
Carl Worth
2bf06e177d Makefile: Re-order the commands in "make release" slightly.
We put verify-version as a dependency, not a recursive action to keep
its output clean, (I know that I will always type "make release"
instead of "make VERSION=X.Y release" so I want a nice, neat
reminder).

Also, put the various ssh-based commands together, and after the
build, (so that it doesn't ask for a password/passphrase both before
and after building).
2010-04-15 16:30:50 -07:00
Carl Worth
9eb53a6052 Makefile: Simplify the release targets.
Previously, we had a separate release-upload target that a user might
mistake as something useful to call directly, (which would have the
undesired effect or uploading a new package, but without first making
all the checks that we want).

So we eliminate that target, (folding its actions into "make
release"), and we also rename the several release-verify-foo targets
to simply verify-foo. This leaves as the only targets with "release"
in the name as "release" and "release-message". Both of these are
intended for the user to call directly.
2010-04-15 16:23:57 -07:00
Carl Worth
dd94313b30 Makefile.local: Fix typo in comment.
Just an extra word that clearly didn't belong.
2010-04-15 16:17:32 -07:00
Carl Worth
f3428823e5 Makefile: Make "make release" run the test suite.
This drops one manual step from our release process, (helping
to ensure we don't forget anything during the release).
2010-04-15 16:08:37 -07:00
Carl Worth
e96f7ca585 Makefile: Add a "make test" target.
I just wasted far too much time looking for a bug that wasn't actually
there only because I hadn't recompiled before running the test
suite. Now we can take advantage of actual dependency information to
force a rebuild for "make test".
2010-04-15 14:56:21 -07:00
Carl Worth
3d7af74ce5 Makefile: Fix final linking of notmuch binary for OS X.
Apparently the OS X linker can't resolve symbols when linking a
program (notmuch) against a library (libnotmuch) when the library
depends on another library (libgmime) that the program doesn't depend
on directly.

For this case, we need to link the program directly against both
libraries, but we don't want to do this on Linux, where the linker can
do this on its own and the explicit, unneeded link would cause
problems.
2010-04-14 16:29:50 -07:00
Aaron Ecay
8c8079a8b1 Add infrastructure for building shared library on OS X.
This patch adds a configure check for OS X (actually Darwin),
and sets up the Makefiles to build a proper shared library on
that platform.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
2010-04-14 16:10:27 -07:00
Carl Worth
f206408358 Makefile: Move compat sources from the client code to the library.
Since the library code needs these as well.
2010-04-14 16:03:18 -07:00
Carl Worth
25f3185ad0 Makefile: Move include of Makefile.config up from Makefile.local
The recent change to include sub-directory Makefile.local files
before the top-level Makefile.local means that we need to include
the Makefile.config before those. So move it up from Makefile.local
to Makefile.
2010-04-14 11:34:12 -07:00
Aaron Ecay
c10085c77b Fix up Makefile for build.
Must set extra_c(xx)flags before including subdir Makefile.local's,
so that there is a blank slate that the subdirs can add on to.

Must include subdir Makefile.local's before global one, otherwise
the compat sources are not added to the list of those to be
compiled.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
2010-04-14 10:46:36 -07:00
Aaron Ecay
16f0e7dcf4 Use C++ compiler to link notmuch binaries
Since the binaries contain C++ code, it is necessary to use the C++
linker, or errors result on some platforms (OS X).

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
2010-04-14 10:27:36 -07:00
Michal Sojka
452fbedcd5 Decode headers in reply
When headers contain non-ASCII characters, they are encoded according
to rfc2047. Nomtuch reply command emits the headers in the encoded
form, which makes them hard to read by humans who compose the reply.

For example instead of "Subject: Re: Rozlučka" one currently sees
"Subject: Re: =?iso-8859-2?q?Rozlu=E8ka?=".

This patch adds a new GMime filter which is used to decode headers to
UTF-8 and uses this filter when notmuch reply outputs headers.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2010-04-13 09:23:54 -07:00
Michal Sojka
09aaff1324 Derive version numbers from git
I often have several versions of notmuch compiled and it would be very
helpful to be able to distinguish between them. Git has a very nice
feature to make intermediate numbering automatic and unambiguous so
let's use it here.

For tagged versions, the version is the name of the tag, for
intermediate versions, the unique ID of the commit is appended to the
tag name.

When notmuch is compiled from a release tarball, there is no git
repository and therefore the tarball contains a special file 'version',
which contains the version of release tarball.

To create a new release one has to run 'make release VERSION=X.Y'.
2010-04-09 19:05:26 -07:00
Carl Worth
7d9851e293 Merge branch 'debian'
These are the changes made between the notmuch 0.1 release and the
release of Debian version 0.1-1. It's mostly changes to the debian
directory, of course, but does also include some generally useful
Makefile improvements.
2010-04-06 18:44:20 -07:00
Carl Worth
ae9d67fd81 Avoid needlessly linking final notmuch binary against libXapian.
The libnotmuch.so library already does, so we don't need to do
it again. (Thanks to a Debian debhelper warning for pointing this
out.)
2010-04-06 18:30:43 -07:00
Carl Worth
53fa1ed0a8 Makefile: Add a disctclean target (simply calling clean)
We currently don't distribute anything that's not already in git, so
there's no difference between these two targets, (but debhelper wants
to be able to call distclean).
2010-04-06 18:30:43 -07:00
Carl Worth
1d1ad74db9 configure: Add support for a --mandir option
Again, nothing tricky here.
2010-04-06 14:42:09 -07:00
Carl Worth
b5d8fe2784 Makefile: Move the completion-specific commands to completion/Makefile.local
For much better modularity.
2010-04-06 14:36:31 -07:00
Carl Worth
0f34809197 Makefile: Eliminate the separate install-bash and install-zsh targets.
Again, simplifying the interface to the Makefile. Installing these
files doesn't require bash nor zsh to actually be installed, so there's
little harm in just installing them unconditionally.
2010-04-06 14:36:31 -07:00
Carl Worth
a5ed8c68f6 Makefile: Eliminate the "make install-emacs" target.
Instead, simply byte-compile the emacs source files as part of "make"
and install them as part of "make install". The byte compilation is
made conditional on the configure script finding the emacs binary.
That way, "make; make install" will still work for someone that doesn't
have emacs installed, (which was the only reason we had made a separate
"make install-emacs" target in the first place).
2010-04-06 14:36:31 -07:00
Carl Worth
f89b3d16db Makefiles: Eliminate the useless quiet_* functions.
With the original quiet function, there's an actual purpose (hiding
excessively long compiler command lines so that warnings and errors
from the compiler can be seen).

But with things like quiet_symlink there's nothing quieter. In fact
"SYMLINK" is longer than "ln -sf". So all this is doing is hiding the
actual command from the user for no real benefit.

The only actual reason we implemented the quiet_* functions was to be
able to neatly right-align the command name and left-align the arguments.

Let's give up on that, and just left-align everything, simplifying the
Makefiles considerably. Now, the only instances of a captialized command
name in the output is if there's some actually shortening of the command
itself.
2010-04-06 14:36:31 -07:00
Carl Worth
9ed5e095a8 make release: Add "what's new" and "what is notmuch" sections to announcement
For other projects I release, there's a bunch of manual effort in
cosntructing the final release-announcement email. That's silly.
So automate this by extracting the appropirate text from NEWS and
by including a canned piece of the content from README.
2010-04-05 17:24:20 -07:00
Carl Worth
8782bd926e Makefile: Print template for release announcement.
At the end of "make release" or at any point later with
"make release-message".
2010-04-05 16:38:56 -07:00
Carl Worth
1b0830b31c Makefile: Make the "make release" target push the new tag.
Otherwise I'm sure I'll always forget to push it.
2010-04-05 15:56:23 -07:00
Carl Worth
322eaebabe Merge commit '0.1'
This is a merge of the few changes I made to release 0.1
retroactively, (after having incremented the version to 0.1.1).

Conflicts:
	Makefile.local (renamed NOTMUCH_VERSION to VERSION)
2010-04-05 15:54:17 -07:00
Carl Worth
4c7ee0f016 Makefile: Finish implementing the "make release" target.
And hopefully it actually works.
2010-04-05 15:46:05 -07:00
Carl Worth
cdb6e12d8c Makefile: Start implementing a "make release" target.
So far just doing checks that the version is sane and that no release
of the same version already exists.
2010-04-05 15:31:15 -07:00
Carl Worth
1e66fb0e22 Increment version to 0.1.1
After publishing the first notmuch release (0.1) to
http://notmuchmail.org/releases .
2010-04-05 14:25:06 -07:00
Carl Worth
04e816416f Makefile: Add a dist target.
To create a versioned tar file for release.
2010-04-05 14:22:00 -07:00
Carl Worth
4235ef5109 Makfiles: Make the top-level targets PHONY
Just to avoid any clash with files of the same names.
2010-04-05 12:59:06 -07:00
David Edmondson
d3884a5984 Makefile.local: Automatically use makefile mode
We add a magic line to the beginning of each Makefile.local file to
help the editor know that it should use makefile mode for editing the
file, (even though the filename isn't exactly "Makefile").

Edited-by: Carl Worth <cworth@cworth.org>: Expand treatment from
emacs/Makefile.local to each instance of Makefile.local.
2010-04-03 12:31:49 -07:00
David Edmondson
7b1566db8a Makefile: Add the emacs directory to load-path when compiling
Reviewed-by: Carl Worth <cworth@cworth.org>: Presumably, this is to
enable proper building in the very near-term future where the emacs
implementation consists of multiple files where some will `require'
functions from others.
2010-04-03 12:11:55 -07:00
Carl Worth
a07962d3ec Makefile: Only print the "make install" hint after the first build.
It was getting quite annoying to see this big block of text on every
little build, (but I didn't want to get rid of it for any new users).
This seems to strike the right balance.
2010-04-02 14:06:32 -07:00
Carl Worth
b2a9fcd5cf notmuch: Add a version (0.1 initially) with a new --version option.
We're planning to do actual releases soon, so we need a version
number to put into the tar file.
2010-04-02 11:55:09 -07:00
Carl Worth
f689c83af4 Compile a static notmuch binary (but only install the shared version)
The idea here is to allow a new user of notmuch to be able to run
notmuch immediately after compiling, (without having to install
the shared library first). This also ensures that the test suite
tests the locally compiled library, and not whatever installled
version of the library the dynamic linker happens to find.
2010-04-01 15:03:40 -07:00
Carl Worth
c0961e6a82 lib: Switch to a 3-part version number for the library interface.
With a carefully documented description of how to increment the
various version components.
2010-04-01 00:41:25 -07:00
Carl Worth
c20be126e5 Makefiles: Align the columns of output.
Much better.
2010-04-01 00:07:08 -07:00
Carl Worth
33d5cc415e Makefiles: Make the install rules quiet like the compilation rules.
The output from make is looking better all the time, (though the
columns still aren't lined up).
2010-03-31 23:54:21 -07:00
Carl Worth
e7131a5983 Makefile: Fix to print CFLAGS with "make V=0"
The default "make" would be quite quiet, but still conveniently print
the CFLAGS. The explicit "make V=0" was intended to be identical, (only
not printing the message about V=1 but was broken in that it left the
CFLAGS off). Fix this.
2010-03-31 23:32:35 -07:00
Carl Worth
8c671a17c0 Makefiles: Eliminate shell for loops in rule definitions.
These just made the output look so ugly, and weren't actually making
the rule definitions any simpler. Good riddance.
2010-03-31 22:59:30 -07:00
Carl Worth
7b52b2c318 Move installation of library from top-level to lib/Makefile.local
We had a fairly ugly violation of modularity with the top-level
Makefile.local isntalling everything, (even when the build commands
for the library were down in lib/Makefile.local).
2010-03-31 22:54:15 -07:00
Carl Worth
ab95219a2f Move some variable assignments from Makefile.local to Makefile.config
There's not any special configure logic for determining these variable
values, but if we did add some in the future, then these will now be
in the right place for that.

Additionally, this now makes Makefile.local the single place for the
user to look for manually tweaking a variable assignment, (say, for a
compiler that can't accept a particular warning argument).

With this change, there should rarely be any need for a user to poke
into any Makefile.local file.
2010-03-31 22:54:08 -07:00
Carl Worth
784e55d0f9 Move bulk of rules from Makefile to Makefile.local.
Before it was impossible to know whether any particular setting or
rule definition was in Makefile or Makefile.local. So we strip the
Makefile down to little more than the list of sub-directories and
the logic to include all of the sub-directories' Makefile.local
fragments.

Then, all of the real work can happen inside of Makefile.local.
2010-03-31 22:12:01 -07:00
Ingmar Vanhassel
acaff279e2 Add a --libdir option to ./configure
This allows packagers to specify to which directory libraries should be
installed.

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2010-03-31 18:07:58 -07:00
Ben Gamari
266ab595a2 Build and link against notmuch shared library, install notmuch.h
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2010-03-31 17:38:27 -07:00
Carl Worth
b6df83bef0 Makefile: Conditionalize the "make install" message.
This is the same approach as with the 'all' target previously.
2010-03-10 10:48:47 -08:00
Carl Worth
985263cf51 Makefile: Simplify the conditional message of the all target.
We wamt a simple "make" to call the 'all' target and then print a
message when done, but we don't want "make install" which depends on
that same 'all' target to print the message.

We previously did this with a separate 'all-without-message' target,
which was inelegant because it caused all users of the target to
carefully depend on 'all-without-message' rather than 'all'.

Instead, we now use a single 'all' target but with a Makefile
conditional that examines the MAKECMDGOALS variable to determine
whether to print the message.
2010-03-10 10:44:44 -08:00
Carl Worth
adf5c5ec35 Makefile: Add message to make install listing the other install targets.
Otherwise, it's hard for the user to know that things like install-emacs,
install-bash, and install-zsh even exist.
2010-03-10 10:07:34 -08:00
Carl Worth
2b8131f079 Makefile: Add a meesage after "make" telling the user to run "make install"
As one command completes, it's kind of the tool to indicate which
command the user should execute next.
2010-03-09 17:03:11 -08:00
David Bremner
bbda0a0156 emacs: Move emacs UI (currently just one file) to subdirectory.
Add emacs/Makefile.local and emacs/Makefile. Move emacs targets into
emacs/Makefile.local, but leave the byte compilation rule in the top
level Makefile.
2010-03-09 12:13:33 -08:00
Scott Robinson
6ce2bf68f5 Add an "--format=(json|text)" command-line option to both notmuch-search and notmuch-show.
In the case of notmuch-show, "--format=json" also implies
"--entire-thread" as the thread structure is implicit in the emitted
document tree.

As a coincidence to the implementation, multipart message ID numbers are
now incremented with each part printed. This changes the previous
semantics, which were unclear and not necessary related to the actual
ordering of the message parts.
2010-02-23 12:01:12 -08:00
Jeffrey C. Ollie
1bf121924d Add install target for notmuch.desktop file.
Add an install target that uses desktop-file-install to install the
desktop file in the appropriate location.  The location of the install
can be modified by changing the desktop_dir variable.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2010-01-24 07:29:54 +13:00
martin f. krafft
1ef33800df Install zsh completion file
According to the Debian zsh maintainer Clint Adams, this is the first
time that a package installs its own completer into zsh. Part of the
reason this is not usually done is because zsh does not provide a stable
API.

We agreed to try it, given that notmuch is expected to change quite
a bit initially. If there are problems or the completer goes stable,
we'll move it into the upstream zsh repository.

Signed-off-by: martin f. krafft <madduck@debian.org>
2010-01-14 18:12:13 +13:00
Jameson Graef Rollins
263aeb82f0 fix Makefile.local to install bash completion definitions as not executable 2009-12-04 16:14:39 -08:00
Carl Worth
c7f971e8c0 Fix quiet compilation to print the user's CFLAGS, CXXFLAGS, LDFLAGS.
The only reason I ever call "make V=1" myself, (other than when
debugging the compiler command-line for some reason), is to ensure
whether my CFLAGS, (like "-g -O0" or "-O2"), are actually making it to
the command-line.

But these are hard to find in the V=1 output, and really, we should
just print these even in the quiet case. So do that.
2009-12-04 15:08:37 -08:00
Carl Worth
880b21a097 Makefile: Incorporate getline implementation into the build.
It's unconditional for a very short time. We expect to soon be
building it only if necessary.
2009-12-01 16:33:17 -08:00
Carl Worth
7c2c26bc4e Makefile: Add new "install-bash" target for bash completion support
It was problematic to have this in "make install" since it would
unconditionally try to install to /etc, (even if a non-privileged user
was attempting an install to a prefix in the user's home directory,
for example).
2009-12-01 10:14:00 -08:00
Jan Janak
f8baa02335 notmuch: New command 'search-tags'.
This is a new notmuch command that can be used to search for all tags
found in the database. The resulting list is alphabetically sorted.

The primary use-case for this new command is to provide the tag
completion feature in Emacs (and other interfaces).

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-26 07:02:48 -08:00
Keith Packard
53f8cc5651 Add 'notmuch count' command to show the count of matching messages
Getting the count of matching threads or messages is a fairly
expensive operation. Xapian provides a very efficient mechanism that
returns an approximate value, so use that for this new command.

This returns the number of matching messages, not threads, as that is
cheap to compute.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23 06:33:54 +01:00
Chris Wilson
986f6c9824 notmuch-new: Only install SIGALRM if not running under gdb
I felt sorry for Carl trying to step through an exception from xapian
and suffering from the SIGALARMs..

We can detect if the user launched notmuch under a debugger by either
checking our cmdline for the presence of the gdb string or querying if
valgrind is controlling our process. For the latter we need to add a
compile time check for the valgrind development library, and so add the
initial support to build Makefile.config from configure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Carl Worth <cworth@cworth.org>
[ickle: And do not install the timer when under the debugger]
2009-11-22 05:36:36 +01:00
Carl Worth
1266d8511e Makefile: Fix to work even with GZIP environment variable set.
The rule here was written to assume that if the GZIP environment
variable was set that it would be the gzip binary to execute,
(similar to the CC and CXX variables). But GZIP is actually used
to pass arguments to gzip, so we have to use a different name.
2009-11-22 04:45:16 +01:00
Chris Wilson
530df68258 Makefile: Magic silent rules.
Use the facilities of GNU make to create a magic function that will
on the first invocation print a description of how to enable verbose
compile lines and then print the quiet rule.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Carl Worth <cworth@cworth.org>
Cc: Mikhail Gusarov <dottedmag@dottedmag.net>

[ickle: Rebased, and duplicate command string eliminated.]
[ickle: Fixed verbose bug pointed out by Mikhail]
2009-11-22 04:29:29 +01:00