1 .PHONY : all clean bin-clean config default dist exe help html lib TAGS\
2 po doc doc-stage-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2
14 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
15 bin-clean: local-bin-clean
22 local-bin-clean: local-clean
24 ifneq ($(strip $(depth)),.)
26 $(MAKE) -C $(depth) dist
30 $(MAKE) local-distclean
33 $(MAKE) local-distclean
36 rm -f aclocal.m4 configure
40 $(MAKE) local-maintainerclean
41 $(MAKE) local-distclean
44 # This doesn't allow command-line options, is it really useful? -jm
46 ./$(src-depth)/configure
50 @echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
51 @echo "Usage: make ["VARIABLE=value"]... [TARGET]"
53 @echo "Targets specific to current directory:"
55 help: generic-help local-help
56 @echo "Generic targets that recurse into subdirectories*:"
57 @echo " all update everything except documentation with images"
58 @echo " clean remove all generated stuff in $(outdir)"
59 @echo " bin-clean same as clean, except that mf/out is preserved"
60 @echo " doc update documentation with images in directory \`out-www'"
61 @echo " doc-stage-1 update only PDF and Info documentation in directory \`out-www'"
62 @echo " doc-clean clean \`out-www' directory"
63 @echo " install install programs and data (prefix=$(prefix))"
64 @echo " uninstall uninstall programs and data"
66 @echo " *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
67 @echo " any of the above commands to the current directory."
69 @echo "Other generic targets:"
70 @echo " default same as the empty target"
71 @echo " exe update all executables"
72 @echo " help this help"
73 @echo " lib update all libraries"
74 @echo " TAGS generate tagfiles"
76 @echo "\`make' may be invoked from any subdirectory."
80 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
81 mkdir -p $(distdir)/$(localdir)
82 $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
84 case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
85 $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
87 case "$(OUT_DIST_FILES)x" in x) ;; *) \
88 mkdir -p $(distdir)/$(localdir)/$(outdir); \
89 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
91 $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
101 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
103 -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
104 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
105 $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
106 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
110 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(step-bindir)/make-version.py
111 $(PYTHON) $(step-bindir)/make-version.py $< > $@
113 $(outdir)/config.hh: $(config_h)
116 configure: configure.in aclocal.m4
117 NOCONFIGURE=yes $(src-depth)/autogen.sh
124 local-maintainerclean:
127 $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
129 ifeq ($(strip $(depth)),.)
135 install: local-install
141 uninstall: local-uninstall
147 -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
148 cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
150 -include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep)
154 touch $(outdir)/dummy.dep
155 echo '*' > $(outdir)/.gitignore
163 $(config_make): $(top-src-dir)/configure
164 @echo "************************************************************"
165 @echo "configure changed! You should probably reconfigure manually."
166 @echo "************************************************************"
167 (cd $(top-build-dir); ./config.status)
168 touch $@ # do something for multiple simultaneous configs.
171 #### Documentation (website and tarball)
173 # documentation is built in two stages,
174 # plus WWW-post (only at toplevel)
175 # see INSTALL for more information.
190 $(MAKE) out=www WWW-2
191 $(MAKE) out=www WWW-post
194 $(MAKE) out=www local-WWW-1
195 $(MAKE) out=www local-WWW-2
196 $(MAKE) out=www WWW-post
199 $(MAKE) -C $(depth)/scripts/build out=
200 $(MAKE) out=www WWW-1
203 $(MAKE) out=www clean