1 .PHONY : all clean bin-clean default dist exe help html lib man TAGS\
2 po doc doc-stage-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\
3 local-all local-clean local-bin-clean local-doc log-clean
18 find . -name "*.log" -delete
20 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
21 bin-clean: local-bin-clean
28 local-bin-clean: local-clean
30 ifneq ($(strip $(depth)),.)
32 $(MAKE) -C $(depth) dist
36 @echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
37 @echo "Usage: make ["VARIABLE=value"]... [TARGET]"
39 @echo "Targets specific to current directory:"
41 help: generic-help local-help
42 @echo "Generic targets that recurse into subdirectories:"
43 @echo " all update everything except documentation with images"
44 @echo " (same as the empty target)"
45 @echo " clean remove all generated stuff in $(outdir)"
46 @echo " bin-clean same as clean, except that mf/out is preserved"
47 @echo " doc update documentation with images in directory \`out-www'"
48 @echo " doc-stage-1 update only PDF and Info documentation in directory \`out-www'"
49 @echo " doc-clean clean \`out-www' directory"
50 @echo " install install programs and data (prefix=$(prefix))"
51 @echo " uninstall uninstall programs and data"
52 @echo " test build regression tests for the program and scripts"
54 @echo " *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
55 @echo " any of the above commands to the current directory."
57 @echo "Other generic targets:"
58 @echo " default same as \`make all', but restricted to the current directory"
59 @echo " exe update all executables"
60 @echo " help this help"
61 @echo " lib update all libraries"
62 @echo " log-clean remove .log files"
63 @echo " TAGS generate tagfiles"
65 @echo "\`make' may be invoked from any subdirectory that contains a GNUmakefile."
69 local-dist: $(OUT_DIST_FILES)
70 case "$(OUT_DIST_FILES)x" in x) ;; \
71 *) mkdir -p $(distdir)/$(localdir)/$(outdir) && \
72 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
74 $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
84 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
86 -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
87 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
88 $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
89 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
93 # Don't use $(buildscript-dir)/make-version, because it is not known whether
94 # build process has visited scripts/build
95 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(top-src-dir)/scripts/build/make-version.py
96 $(PYTHON) $(top-src-dir)/scripts/build/make-version.py $< > $@
98 $(outdir)/config.hh: $(config_h)
101 configure: configure.ac aclocal.m4
102 NOCONFIGURE=yes $(src-depth)/autogen.sh
110 $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
112 ifeq ($(strip $(depth)),.)
118 install: local-install
124 uninstall: local-uninstall
130 -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
131 cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
133 -include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep)
137 touch $(outdir)/dummy.dep
138 echo '*' > $(outdir)/.gitignore
146 $(config_make): $(top-src-dir)/configure
147 @echo "************************************************************"
148 @echo "configure changed! You should probably reconfigure manually."
149 @echo "************************************************************"
150 (cd $(top-build-dir); ./config.status)
151 touch $@ # do something for multiple simultaneous configs.
154 #### Documentation (website and tarball)
156 # documentation is built in two stages,
157 # plus WWW-post (only at toplevel)
158 # see INSTALL for more information.
173 $(MAKE) out=www WWW-2
174 $(MAKE) out=www WWW-post
177 $(MAKE) out=www local-WWW-1
178 $(MAKE) out=www local-WWW-2
179 $(MAKE) out=www WWW-post
182 $(MAKE) -C $(top-build-dir)/Documentation/po out=www messages
183 $(MAKE) -C $(depth)/scripts/build out=
184 $(MAKE) out=www WWW-1
187 $(MAKE) out=www clean