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.
5 # List all subdirectories here. Each contains its own Makefile.local
6 subdirs = compat completion emacs lib test
8 # We make all targets depend on the Makefiles themselves.
9 global_deps = Makefile Makefile.config Makefile.local \
10 $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
12 # Sub-directory Makefile.local fragments can append to these variables
13 # to have directory-specific cflags as necessary.
18 # Get settings from the output of configure by running it to generate
19 # Makefile.config if it doesn't exist yet.
21 # If Makefile.config doesn't exist, then srcdir won't be
22 # set. Conditionally set it (assuming a plain srcdir build) so that
23 # the rule to generate Makefile.config can actually work.
26 include Makefile.config
27 Makefile.config: $(srcdir)/configure
28 ifeq ($(configure_options),)
30 @echo "Note: Calling ./configure with no command-line arguments. This is often fine,"
31 @echo " but if you want to specify any arguments (such as an alternate prefix"
32 @echo " into which to install), call ./configure explicitly and then make again."
33 @echo " See \"./configure --help\" for more details."
36 $(srcdir)/configure $(configure_options)
38 # Finally, include all of the Makefile.local fragments where all the
41 include $(subdirs:%=%/Makefile.local) Makefile.local