]> git.notmuchmail.org Git - notmuch/blob - Makefile
lib: Replace NOTMUCH_*_VERSION with LIBNOTMUCH_*_VERSION
[notmuch] / Makefile
1 # We want the all target to be the implicit target (if no target is
2 # given explicitly on the command line) so mention it first.
3 all:
4
5 # List all subdirectories here. Each contains its own Makefile.local.
6 # Use of '=', without '+=', seems to be required for out-of-tree
7 # builds to work.
8 subdirs = compat completion emacs lib man parse-time-string performance-test util test
9
10 # We make all targets depend on the Makefiles themselves.
11 global_deps = Makefile Makefile.config Makefile.local \
12         $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
13
14 # Sub-directory Makefile.local fragments can append to these variables
15 # to have directory-specific cflags as necessary.
16
17 extra_cflags :=
18 extra_cxxflags :=
19
20 # Get settings from the output of configure by running it to generate
21 # Makefile.config if it doesn't exist yet.
22
23 # If Makefile.config doesn't exist, then srcdir won't be
24 # set. Conditionally set it (assuming a plain srcdir build) so that
25 # the rule to generate Makefile.config can actually work.
26 srcdir ?= .
27
28 include Makefile.config
29 Makefile.config: $(srcdir)/configure
30 ifeq ($(configure_options),)
31         @echo ""
32         @echo "Note: Calling ./configure with no command-line arguments. This is often fine,"
33         @echo "      but if you want to specify any arguments (such as an alternate prefix"
34         @echo "      into which to install), call ./configure explicitly and then make again."
35         @echo "      See \"./configure --help\" for more details."
36         @echo ""
37 endif
38         $(srcdir)/configure $(configure_options)
39
40 # Finally, include all of the Makefile.local fragments where all the
41 # real work is done.
42
43 include $(subdirs:%=%/Makefile.local) Makefile.local