1 .PHONY : all clean bin-clean config default dist doc exe help html lib TAGS\
2 po web web-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\
15 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
16 bin-clean: local-bin-clean
23 local-bin-clean: local-clean
25 ifneq ($(strip $(depth)),.)
27 $(MAKE) -C $(depth) dist
32 $(MAKE) local-distclean
35 $(MAKE) local-distclean
38 rm -f aclocal.m4 configure
42 $(MAKE) local-maintainerclean
43 $(MAKE) local-distclean
46 # This doesn't allow command-line options, is it really useful? -jm
48 ./$(src-depth)/configure
53 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
54 Usage: make ["VARIABLE=value"]... [TARGET]\n\
56 Targets specific to current directory:\n"
58 help: generic-help local-help
59 @echo -e "Generic targets:\n\
60 all * update everything except website documentation\n\
61 clean * remove all generated stuff in $(outdir)\n\
62 bin-clean * same as clean, except that mf/out is preserved\n\
63 default same as the empty target\n\
64 exe update all executables\n\
66 install * install programs and data (prefix=$(prefix))\n\
67 lib update all libraries\n\
68 web * update website in directory \`out-www'\n\
69 web-install * install website documentation in (webdir=$(webdir))\n\
70 and Info documentation with images\n\
71 web-clean * clean \`out-www' directory\n\
72 TAGS generate tagfiles\n\
74 \`make' may be invoked from any subdirectory.\n\
75 Note that all commands marked with a star (*) recurse into subdirectories;\n\
76 prepend \`local-' to restrict operation to the current directory.\n\
77 Example: \`local-clean'."
81 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
82 mkdir -p $(distdir)/$(localdir)
83 $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
85 case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
86 $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
88 case "$(OUT_DIST_FILES)x" in x) ;; *) \
89 mkdir -p $(distdir)/$(localdir)/$(outdir); \
90 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
92 $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
102 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
104 -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
105 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
106 $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
107 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
111 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(step-bindir)/make-version.py
112 $(PYTHON) $(step-bindir)/make-version.py $< > $@
114 $(outdir)/config.hh: $(config_h)
117 configure: configure.in aclocal.m4
118 NOCONFIGURE=yes $(src-depth)/autogen.sh
125 local-maintainerclean:
128 $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
130 ifeq ($(strip $(depth)),.)
136 install: local-install
142 uninstall: local-uninstall
148 -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
149 cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
151 include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep) # expect a warning here
154 @echo please ignore innocent warning about dummy.dep
156 touch $(outdir)/dummy.dep
157 echo '*' > $(outdir)/.gitignore
165 $(config_make): $(top-src-dir)/configure
166 @echo "************************************************************"
167 @echo "configure changed! You should probably reconfigure manually."
168 @echo "************************************************************"
169 (cd $(top-build-dir); ./config.status)
170 touch $@ # do something for multiple simultaneous configs.
173 #### Documentation (website and tarball)
175 # documentation is built in two stages,
176 # plus WWW-post (only at toplevel)
177 # see INSTALL for more information.
191 $(MAKE) out=www WWW-1
192 $(MAKE) out=www WWW-2
193 $(MAKE) out=www WWW-post
196 $(MAKE) out=www WWW-1
199 find -name out-www | xargs rm -rf
200 $(MAKE) out=www clean