1 .PHONY : all clean bin-clean 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\
16 find . -name "*.log" -delete
18 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
19 bin-clean: local-bin-clean
26 local-bin-clean: local-clean
28 ifneq ($(strip $(depth)),.)
30 $(MAKE) -C $(depth) dist
34 @echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
35 @echo "Usage: make ["VARIABLE=value"]... [TARGET]"
37 @echo "Targets specific to current directory:"
39 help: generic-help local-help
40 @echo "Generic targets that recurse into subdirectories*:"
41 @echo " all update everything except documentation with images"
42 @echo " clean remove all generated stuff in $(outdir)"
43 @echo " bin-clean same as clean, except that mf/out is preserved"
44 @echo " doc update documentation with images in directory \`out-www'"
45 @echo " doc-stage-1 update only PDF and Info documentation in directory \`out-www'"
46 @echo " doc-clean clean \`out-www' directory"
47 @echo " install install programs and data (prefix=$(prefix))"
48 @echo " uninstall uninstall programs and data"
49 @echo " test build regression tests for the program and scripts"
51 @echo " *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
52 @echo " any of the above commands to the current directory."
54 @echo "Other generic targets:"
55 @echo " default same as the empty target"
56 @echo " exe update all executables"
57 @echo " help this help"
58 @echo " lib update all libraries"
59 @echo " log-clean remove .log files"
60 @echo " TAGS generate tagfiles"
62 @echo "\`make' may be invoked from any subdirectory that contains a GNUmakefile."
66 local-dist: $(OUT_DIST_FILES)
67 case "$(OUT_DIST_FILES)x" in x) ;; \
68 *) mkdir -p $(distdir)/$(localdir)/$(outdir) && \
69 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
71 $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
81 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
83 -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
84 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
85 $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
86 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
90 # Don't use $(buildscript-dir)/make-version, because it is not known whether
91 # build process has visited scripts/build
92 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(top-src-dir)/scripts/build/make-version.py
93 $(PYTHON) $(top-src-dir)/scripts/build/make-version.py $< > $@
95 $(outdir)/config.hh: $(config_h)
98 configure: configure.ac aclocal.m4
99 NOCONFIGURE=yes $(src-depth)/autogen.sh
107 $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
109 ifeq ($(strip $(depth)),.)
115 install: local-install
121 uninstall: local-uninstall
127 -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
128 cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
130 -include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep)
134 touch $(outdir)/dummy.dep
135 echo '*' > $(outdir)/.gitignore
143 $(config_make): $(top-src-dir)/configure
144 @echo "************************************************************"
145 @echo "configure changed! You should probably reconfigure manually."
146 @echo "************************************************************"
147 (cd $(top-build-dir); ./config.status)
148 touch $@ # do something for multiple simultaneous configs.
151 #### Documentation (website and tarball)
153 # documentation is built in two stages,
154 # plus WWW-post (only at toplevel)
155 # see INSTALL for more information.
170 $(MAKE) out=www WWW-2
171 $(MAKE) out=www WWW-post
174 $(MAKE) out=www local-WWW-1
175 $(MAKE) out=www local-WWW-2
176 $(MAKE) out=www WWW-post
179 $(MAKE) -C $(top-build-dir)/Documentation/po out=www messages
180 $(MAKE) -C $(depth)/scripts/build out=
181 $(MAKE) out=www WWW-1
184 $(MAKE) out=www clean