aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
Commit message (Collapse)AuthorAge
* build-system: update for split man pagesGravatar David Bremner2011-12-31
| | | | | | | | | | | | | | | | | | - We have to remove the installation of notmuch.1.gz from the top level Makefile.local. - Man pages with multiple names are handled by making relative symlinks in the install-man target. - update version tests and convenience rules for split man pages The man page version test still only checks notmuch.1, but the location is updated. update-man-versions is longer than the one-line previously in update-versions mainly because I decided to take the high road and stick to POSIX sed (thus, no sed -i). The sed regex itself is more complicated to cope with variations in the headers.
* xutil.c: remove duplicate copies, create new library libutil.a to contain xutil.Gravatar David Bremner2011-10-30
| | | | | | | We keep the lib/xutil.c version. As a consequence, also factor out _internal_error and associated macros. It might be overkill to make a new file error_util.c for this, but _internal_error does not really belong in database.cc.
* build: Save configure options and re-use them for automatic runs of configureGravatar Carl Worth2011-03-10
| | | | | | | | | This supports the case of a user running "configure --prefix=/foo" then later updating the soruce (including the configure script) and re-running make. In this case, the make invocation will re-run configure. Before this change, this run of configure would lose the user's carefully chosen prefix. This is now fixed so that configrue is re-run with the user's options.
* build: Fix a plain "make" to automatically run configure.Gravatar Carl Worth2011-03-10
| | | | The recent change to support non-source-directory builds broke this case.
* build: Add support for non-source-directory builds.Gravatar Carl Worth2011-03-09
| | | | | | | | | | | | | | 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.
* test: Fix test suite to integrate with our non-recursive Makefile system.Gravatar Carl Worth2010-09-17
| | | | | | | 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.
* Makefile: Move include of Makefile.config up from Makefile.localGravatar Carl Worth2010-04-14
| | | | | | | 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.
* Fix up Makefile for build.Gravatar Aaron Ecay2010-04-14
| | | | | | | | | | | 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>
* Makefile: Move the completion-specific commands to completion/Makefile.localGravatar Carl Worth2010-04-06
| | | | For much better modularity.
* Move bulk of rules from Makefile to Makefile.local.Gravatar Carl Worth2010-03-31
| | | | | | | | | | 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.
* Build and link against notmuch shared library, install notmuch.hGravatar Ben Gamari2010-03-31
| | | | Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
* Makefile: Fix Makefiles to depend on all child Makefile fragments.Gravatar Carl Worth2010-03-10
| | | | | | | | | | | | | | We were previously maintaining two lists of the child Makefile fragments---one for the includes and another for the dependencies. So, of course, they drifted and the dependency list wasn't up to date. We fix this by adding a single subdirs variable, and then using GNU Makefile substitution to generate both the include and the dependency lists. Some side effect of this change caused the '=' assignment of the dir variable to not work anymore. I'm not sure why that is, but using ':=' makes sense here and fixes the problem.
* Makefile: Use 'emacs --quick' for a less noisy build of "make install-emacs".Gravatar Carl Worth2010-03-10
| | | | | I don't really notice if it goes any quicker, but it's sure nice to have less spew now.
* Makefile: Simplify the conditional message of the all target.Gravatar Carl Worth2010-03-10
| | | | | | | | | | | | | | 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.
* Makefile: Add a meesage after "make" telling the user to run "make install"Gravatar Carl Worth2010-03-09
| | | | | As one command completes, it's kind of the tool to indicate which command the user should execute next.
* Makefile: Rename all_deps to global_depsGravatar Carl Worth2010-03-09
| | | | | | The "all" inside this variable name was easy to confuse with the separate "all" target. This variable specifies dependencies that apply to every target, so use "global" instead.
* emacs: Move emacs UI (currently just one file) to subdirectory.Gravatar David Bremner2010-03-09
| | | | | | 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.
* Install zsh completion fileGravatar martin f. krafft2010-01-14
| | | | | | | | | | | | | 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>
* Makefile: Mention "./configure --help" now that it exists.Gravatar Carl Worth2009-12-04
| | | | | Since we're directing the user to ./confgiure for more options, actually tell the user how to discover what those options are.
* Makefile: Silence compiler errors during dependency generation.Gravatar Carl Worth2009-12-04
| | | | | | | | | | | | | | | We have a bootstrapping issue with our dependency generation. When the Makefile.config doesn't exist yet, the complete compilation flags are not yet available for passing to the compiler to generate the dependencies. But we don't have explicit rules to create these dependency files, (just the implicit rule that is created by the -include), so we can't control when make will attempt to create them. We do have a dependency of the dependency files on Makefile.config, so make should eventually call the compiler with the correct flags and everything should be good. So in the meantime, silence any complaints.
* Makefile: Inform user that they might want to call ./configure explicitly.Gravatar Carl Worth2009-12-04
| | | | | | If the Makefile does this for the user, then no arguments are passed. So it's only polite to let the user know that it's possible to get pass those arguments.
* configure: Support the capturing of CFLAGS and CXXFLAGS at configure time.Gravatar Carl Worth2009-12-04
| | | | | | | | | | | | | | | | | | These variables can now be set via configure time via environment variables like so: CFLAGS=-g ./configure and subsequent builds will remember these values. The values can still be overridden at compile time by passing make variables: make CFLAGS=-O2 The CXXFLAGS variable is optional. If unset at either configure time or at compile time, it will inherit its value from the CFLAGS variable. (Though if explicitly set at configure time it must be explicitly overriden at compile time---just overriding CFLAGS will not override CXXFLAGS as well.)
* Fix quiet compilation to print the user's CFLAGS, CXXFLAGS, LDFLAGS.Gravatar Carl Worth2009-12-04
| | | | | | | | | | 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.
* configure: Resolve all pkg-config flags at configure time.Gravatar Carl Worth2009-12-01
| | | | | | | | Previously, we were resolving these within the Makefile. This had the problem that if pkg-config was not present, the Makefile would still invoke it resulting in ugly errors before the configure script was even run, (which would finally present a kind error message about pkg-config not being present).
* Makefile: Split warnings into two sets (WARN_CFLAGS and WARN_CXXFLAGS)Gravatar Carl Worth2009-12-01
| | | | | Some C++ compilers complain about -Wmissing-declarations not being valid, so avoid passing it except when compiling a C file.
* Makefile: Switch from echo to printf for better portability.Gravatar Carl Worth2009-12-01
| | | | | | Some systems have an echo implementation which doesn't know how to interpret a sequence of "\n". The word is that printf should be much more portable, so let's try that instead.
* configure: Assimilate new getlinetest into recent configure conventions.Gravatar Carl Worth2009-12-01
| | | | | | | | | We're now using printf to print what we're checking before we check. We're also making variables such as HAVE_GETLINE available to both make and to the C pre-processor. With this, the local getline implementation is now only compiled if not available on the system.
* Makefile: Incorporate getline implementation into the build.Gravatar Carl Worth2009-12-01
| | | | | It's unconditional for a very short time. We expect to soon be building it only if necessary.
* Makefile: Add new "install-bash" target for bash completion supportGravatar Carl Worth2009-12-01
| | | | | | | 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).
* Remove Makefile.config from the repository.Gravatar Carl Worth2009-12-01
| | | | | Instead of shipping a default version, we now add a rule to automatically run configure if necessary to create Makefile.config.
* makefile: Declare clean target as phony.Gravatar Jan Janak2009-11-23
| | | | | | | | This ensures that make clean always proceeds, even if the user accidentally creates a file named 'clean'. Also, it ignores errors in rm and other commands. Signed-off-by: Jan Janak <jan@ryngle.com>
* Makefile: Fix to work even with GZIP environment variable set.Gravatar Carl Worth2009-11-22
| | | | | | | 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.
* Makefile: Magic silent rules.Gravatar Chris Wilson2009-11-22
| | | | | | | | | | | | | 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]
* Makefile: Fix the fallback emacs install path.Gravatar Carl Worth2009-11-21
| | | | | | | When pkg-config can't be used to find out where to install emacs files, we fallback to a hard-coded directory. Only, we were falling back to the wrong thing, (one that emacs doesn't look into by default).
* Drop redundant CFLAGS, was already included in CXXFLAGSGravatar Jed Brown2009-11-21
|
* Makefile: Make object targets depend on MakefilesGravatar Jan Janak2009-11-20
| | | | | | | All objects need to be recompiled when any of the Makefiles changes, so we make them all depend on all the Makefiles. Signed-off-by: Jan Janak <jan@ryngle.com>
* Makefile: Hard-code emacs_lispdir if emacs pkg-config file not availableGravatar Carl Worth2009-11-20
| | | | | Using pkg-config to find this variable is nice if it works. Go back to the previously used value if it doesn't.
* Makefile: Remove unused variable emacs_startdirGravatar Carl Worth2009-11-20
| | | | | | This was added in a prelimnary version of a previous commit that would automatically load notmuch.el for anyone running emacs. It's not used at all in the current Makefile.
* Improve installation of emacs mode.Gravatar Jeffrey C. Ollie2009-11-20
| | | | | | | | | | | | | | | | | | 1) Add a separate targets to build and install emacs mode. 2) Don't hardcode the installation directory, instead use emacs' pkg-config module. 3) Install a byte compiled version of the emacs mode. 4) Install the emacs mode in emacs' site-lisp directory. Put "(require 'notmuch)" in your .emacs to load it automatically. 5) Ignore byte-compiled emacs files. Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us> Reviewed-by: Ingmar Vanhassel <ingmar@exherbo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
* Makefile: evaluate pkg-config onceGravatar Chris Wilson2009-11-19
| | | | | Currently the same `pkg-config ...` is executed for every target, so just store the results in a variable.
* TypsosGravatar Ingmar Vanhassel2009-11-18
|
* Makefile: Change default install prefix from /usr to /usr/localGravatar Carl Worth2009-11-17
| | | | | | | 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: Fix dependency generation for files in sub-directories.Gravatar Carl Worth2009-11-12
| | | | | | | | | | | | | | | | | | | | Otherwise, things in the lib sub-directory weren't getting recompiled even when lib/notmuch.h was changed. The original rule we were using came from the GNU Makefile manual, but only handled files in the current directory, not file in sub-directories as we use here with our non-recursive Makefile. So the .deps files being created were being put in the right place, (such as .deps/lib/database.d), but the compiler was generating a dependency for "database.o" rather than "lib/database.o" like we want. We were already trying to do a sed job on that name to add a dependency for the .d file as well. But the sed job was failing since the expected pattern wasn't there, (the directory name was missing). So the fix is simply to use basename to construct the search pattern, and then use the name with the directory in the replacement (rather than the back-reference).
* Makefile: Change default flags to -O2.Gravatar Carl Worth2009-11-10
| | | | | We've now verified that it's reliable for the user to override CFLAGS on the command line, so just make the user do to get a debug build.
* Makefile: Make the top-level Makefile a little more independent.Gravatar Carl Worth2009-11-10
| | | | | | | Previously, the top-level Makefile was explicitly adding -I./lib to the compiler flags. However, that's something that's much better done from within the Makefile.local fragment within the lib directory itself.
* Makefile: Simplify setting of CFLAGS, etc.Gravatar Carl Worth2009-11-10
| | | | | | | | | | We were previously using separate CFLAGS and NOTMUCH_CFLAGS variables in an attempt to allow the user to specify CFLAGS on the command-line. However, that's just a lot of extra noise in the Makefile when we can instead let the user specify what is desired for CFLAGS and then use an override to append the things we require. So our Makefile is much neater now.
* Makefile: Fix dependency generation to make .d files themselves dependent.Gravatar Carl Worth2009-11-10
| | | | | | | | | | | | | | | I saw this recommendation in the implementation notes for "Recursive Make Considered Harmful" and then the further recommendation for implementing the idea in the GNU make manual. The idea is that if any of the files change then we need to regenerate the dependency file before we regenerate any targets. The approach from the GNU make manual is simpler in that it just uses a sed script to fix up the output of an extra invocation of the compiler, (as opposed to the approach in the implementation notes from the paper's author which use a wrapper script for the compiler that's always invoked rather than the compiler itself).
* Implement a non-recursive make.Gravatar Carl Worth2009-11-10
| | | | | | | | | | | | The idea here is that every Makefile at each lower level will be an identical, tiny file that simply defers to a top-level make. Meanwhile, the Makefile.local file at each level is a Makefile snippet to be included at the top-level into a large, flat Makefile. As such, it needs to define its rules with the entire relative directory to each file, (typically in $(dir)). The local files can also append to variables such as SRCS and CLEAN for files to be analyzed for dependencies and to be cleaned.
* Makefile: Hide away auto-generated dependency file as .depends.Gravatar Carl Worth2009-11-09
| | | | | | Instead of the old name of Makefile.dep. The idea being that the user really doesn't need to see this by default, (and if debugging the Makefile, the rules will make the name obvious).
* libify: Move library sources down into lib directory.Gravatar Carl Worth2009-11-09
| | | | | A "make" invocation still works from the top-level, but not from down inside the lib directory yet.