1 # Top-level Makefile for kpathsea-using programs.
3 # Package subdirectories, the library, and all subdirectories.
6 programs = web2c $(ESUBDIRS)
7 kpathsea_dir = kpathsea
8 all_dirs = $(programs) $(kpathsea_dir)
10 ac_include make/paths.mk
11 ac_include make/makevars.mk
13 # It's too bad we have to pass all these down, but I see no alternative,
14 # if we are to propagate changes at the top level.
15 # XMAKEARGS is for the user to override.
16 makeargs = $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(makevars) $(XMAKEARGS)
17 installargs = INSTALL_DATA='$(INSTALL_DATA)' \
18 INSTALL_PROGRAM='$(INSTALL_PROGRAM)' $(makeargs)
20 # Not everything from common.mk is relevant to this top-level
21 # Makefile, but most of it is, and it doesn't seem worth separating the
22 # compilation-specific stuff.
23 ac_include make/common.mk
25 # Get more of the default setup.
26 ac_include make/programs.mk
28 # kpathsea is not a sibling, it's a child.
31 # Make the library before the programs.
32 # Use if ... rather than || or && because Ultrix sh exits for
33 # no good reason with the latter.
34 default all: do-kpathsea
35 for d in $(programs); do if test -f $$d/Makefile; then \
36 (cd $$d && $(MAKE) $(makeargs) $@) || exit 1; else true; fi; done
38 install install-data install-exec:
39 for d in kpathsea $(programs); do if test -f $$d/Makefile; then \
40 (cd $$d && $(MAKE) $(installargs) $@) || exit 1; else true; fi; done
42 # Other standard targets for everything.
43 uninstall uninstall-exec uninstall-data \
44 mostlyclean clean realclean extraclean configclean \
45 info dvi check depend::
46 for d in $(all_dirs); do if test -f $$d/Makefile; then \
47 (cd $$d && $(MAKE) $(makeargs) $@) || exit 1; else true; fi; done
50 for d in $(all_dirs); do if test -f $$d/Makefile; then \
51 (cd $$d && $(MAKE) $(makeargs) $@) || exit 1; else true; fi; done
54 rm -f Makefile config.status config.cache config.log libtool
56 # Unconditionally remake the library, since we don't want to write out
57 # the dependencies here.
59 cd $(kpathsea_dir) && $(MAKE) $(makeargs)
61 # Targets that only apply to web2c.
62 triptrap trip trap mptrap \
63 formats fmts bases mems \
64 install-formats install-fmts install-bases install-mems \
65 install-links c-sources: do-kpathsea
66 cd web2c && $(MAKE) $(makeargs) $@
68 @MAINT@ac_dir = $(srcdir)/etc/autoconf
69 @MAINT@autoconf = $(ac_dir)/acspecific.m4 $(ac_dir)/acgeneral.m4 $(ac_dir)/acsite.m4
70 @MAINT@configure_in = $(srcdir)/configure.in
71 @MAINT@$(srcdir)/configure: $(configure_in) $(srcdir)/withenable.ac $(autoconf)
72 @MAINT@ cd $(srcdir) && autoconf -m $(ac_dir)
74 @MAINT@# And make sure that --enable-maintainer-mode is used if configure is
75 @MAINT@# called from the makefiles. We do not try to do this through the
76 @MAINT@# cache, lest the option sneaks into a global cache file.
77 @MAINT@enablemaintflag = --enable-maintainer-mode
79 config.status: $(srcdir)/configure
80 $(SHELL) $(srcdir)/configure --no-create --verbose $(enablemaintflag)
82 Makefile: $(srcdir)/Makefile.in config.status
83 $(SHELL) config.status
86 find $(srcdir) \( -name '*.[cCfFhilsy]' -o -name '*.el' \) | etags -