* Makefile.in (TAGS): Produce a single tags file for all of Guile.
[bpt/guile.git] / Makefile.in
CommitLineData
0f2d19dd
JB
1# Copyright (C) 1994,1995 Free Software Foundation, Inc.
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2, or (at your option)
6# any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this software; see the file COPYING. If not, write to
15# the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
2d26def0 17VERSION = @GUILE_VERSION@
0f2d19dd
JB
18
19SHELL = /bin/sh
20
2d26def0 21srcdir=@srcdir@
16ade06b
JB
22subdirs=@build_subdirs@
23dist_dirs=@existingdirs@ doc
0f2d19dd 24
8251fceb
JB
25DISTFILES = COPYING \
26 ChangeLog \
2d26def0 27 GUILE-VERSION \
8251fceb
JB
28 INSTALL \
29 NEWS \
30 README \
2d26def0 31 TODO \
0f2d19dd
JB
32 Makefile.in \
33 configure \
34 configure.in \
35 config.sub \
36 config.guess \
37 install-sh
38
0f2d19dd
JB
39# `all'
40# Compile the entire program. This should be the default target.
41# This target need not rebuild any documentation files; info files
42# should normally be included in the distribution, and DVI files
43# should be made only when explicitly asked for.
44all:
45 @for dir in ${subdirs}; do \
46 cd $$dir; \
47 ${MAKE} all; \
48 cd .. ;\
49 done
50
51#`install'
52# Compile the program and copy the executables, libraries, and so on
53# to the file names where they should reside for actual use. If
54# there is a simple test to verify that a program is properly
55# installed then run that test.
56#
57# Use `-' before any command for installing a man page, so that
58# `make' will ignore any errors. This is in case there are systems
59# that don't have the Unix man page documentation system installed.
60#
61# In the future, when we have a standard way of installing info
62# files, `install' targets will be the proper place to do so.
63#
64subdir-inst-target=install-nobuild
65
66install: all
67 ${MAKE} subdir-inst-target=install install-nobuild
68
69install-nobuild:
70 for dir in ${subdirs}; do \
71 cd $$dir; \
72 ${MAKE} ${subdir-inst-target}; \
73 cd .. ;\
74 done
75
76#`uninstall'
77# Delete all the installed files that the `install' target would
78# create (but not the noninstalled files such as `make all' would
79# create).
80uninstall:
81 for dir in ${subdirs}; do \
82 cd $$dir; \
83 ${MAKE} uninstall; \
84 cd .. ;\
85 done
86
87
88#`clean'
89# Delete all files from the current directory that are normally
90# created by building the program. Don't delete the files that
91# record the configuration. Also preserve files that could be made
92# by building, but normally aren't because the distribution comes
93# with them.
94#
95# Delete `.dvi' files here if they are not part of the distribution.
96#
97clean:
98 for dir in ${subdirs}; do \
99 cd $$dir; \
100 ${MAKE} clean; \
101 cd .. ;\
102 done
103
104#`distclean'
105# Delete all files from the current directory that are created by
106# configuring or building the program. If you have unpacked the
107# source and built the program without creating any other files,
108# `make distclean' should leave only the files that were in the
109# distribution.
110distclean:
111 rm -f config.cache
112 rm -f config.log
113 rm -f config.status
114 rm -f Makefile
115 for dir in ${subdirs}; do \
116 cd $$dir; \
117 ${MAKE} distclean; \
118 cd .. ;\
119 done
120
121
122#`mostlyclean'
123# Like `clean', but may refrain from deleting a few files that people
124# normally don't want to recompile. For example, the `mostlyclean'
125# target for GCC does not delete `libgcc.a', because recompiling it
126# is rarely necessary and takes a lot of time.
127mostlyclean:
128 for dir in ${subdirs}; do \
129 cd $$dir; \
130 ${MAKE} mostlyclean; \
131 cd .. ;\
132 done
133
134
135#`realclean'
136# Delete everything from the current directory that can be
137# reconstructed with this Makefile. This typically includes
138# everything deleted by distclean, plus more: C source files
139# produced by Bison, tags tables, info files, and so on.
140#
141# One exception, however: `make realclean' should not delete
142# `configure' even if `configure' can be remade using a rule in the
143# Makefile. More generally, `make realclean' should not delete
144# anything that needs to exist in order to run `configure' and then
145# begin to build the program.
146realclean:
147 for dir in ${subdirs}; do \
148 cd $$dir; \
149 ${MAKE} realclean; \
150 cd .. ;\
151 done
152
153
154#`TAGS'
155# Update a tags table for this program.
ddc2af86
JB
156# We could allow each subdirectory to create its own TAGS file,
157# and then use etags' --include option to incorporate them all by
158# reference into a top-level TAGS file, but the --include option
159# seems to be deprecated, and this works fine.
0f2d19dd 160TAGS:
ddc2af86
JB
161 etags \
162 --regex='/SCM_PROC[^"]*"[^"]*"/' \
163 `find . -name '*.[ch]' -o -name '*.scm'`
0f2d19dd
JB
164
165#`info'
166# Generate any info files needed. The best way to write the rules
167# is as follows:
168#
169# info: foo.info
170#
171# foo.info: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
172# $(MAKEINFO) $(srcdir)/foo.texi
173#
174# You must define the variable `MAKEINFO' in the Makefile. It
175# should run the Makeinfo program, which is part of the Texinfo2
176# distribution.
177info:
2d26def0 178 cd doc; ${MAKE} info
0f2d19dd
JB
179
180#`dvi'
181# Generate DVI files for all TeXinfo documentation. For example:
182#
183# dvi: foo.dvi
184#
185# foo.dvi: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
186# $(TEXI2DVI) $(srcdir)/foo.texi
187#
188# You must define the variable `TEXI2DVI' in the Makefile. It should
189# run the program `texi2dvi', which is part of the Texinfo2
190# distribution. Alternatively, write just the dependencies, and
191# allow GNU Make to provide the command.
192dvi:
193 for dir in ${subdirs}; do \
194 cd $$dir; \
195 ${MAKE} dvi; \
196 cd .. ;\
197 done
198
199#`dist'
200# Create a distribution tar file for this program. The tar file
201# should be set up so that the file names in the tar file start with
202# a subdirectory name which is the name of the package it is a
203# distribution for. This name can include the version number.
204#
205# For example, the distribution tar file of GCC version 1.40 unpacks
206# into a subdirectory named `gcc-1.40'.
207#
208# The easiest way to do this is to create a subdirectory
209# appropriately named, use `ln' or `cp' to install the proper files
210# in it, and then `tar' that subdirectory.
211#
212# The `dist' target should explicitly depend on all non-source files
213# that are in the distribution, to make sure they are up to date in
214# the distribution. *Ref Making Releases: (standards)Releases.
2d26def0
JB
215.PHONY: dist
216GZIP=gzip --best
217GZIP_EXT=.gz
218TAR_VERBOSE=v
219DIST_NAME=guile-${VERSION}
220dist: info
221 @echo "Creating distribution for ${DIST_NAME}."
222 rm -rf ${DIST_NAME} ${DIST_NAME}.tar${GZIP_EXT}
223 ${MAKE} dist-dir DISTDIR="${DIST_NAME}"
224 for dir in ${dist_dirs}; do \
225 ( DISTDIR="../${DIST_NAME}/$${dir}"; \
226 cd $${dir} && \
227 ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
228 ); \
0f2d19dd 229 done
2d26def0
JB
230 tar chf${TAR_VERBOSE} - ${DIST_NAME} | ${GZIP} > "${DIST_NAME}.tar${GZIP_EXT}"
231 rm -rf ${DIST_NAME}
232
233# The `dist' target in the top-level Makefile uses this `dist-dir'
234# target to select the appropriate files for distribution from the
235# directory containing this Makefile.
236.PHONY: dist-dir
237dist-dir:
238 mkdir ${DISTDIR}
239 for i in ${DISTFILES}; do \
240 ln $(srcdir)/$${i} ${DISTDIR}; \
241 done
0f2d19dd
JB
242
243#`check'
244# Perform self-tests (if any). The user must build the program
245# before running the tests, but need not install the program; you
246# should write the self-tests so that they work when the program is
247# built but not installed.
248check:
249 for dir in ${subdirs}; do \
250 cd $$dir; \
251 ${MAKE} check; \
252 cd .. ;\
253 done
254
255
256#`installcheck'
257# Perform installation tests (if any). The user must build and
258# install the program before running the tests. You should not
259# assume that `$(bindir)' is in the search path.
260installcheck:
261 for dir in ${subdirs}; do \
262 cd $$dir; \
263 ${MAKE} installcheck; \
264 cd .. ;\
265 done
266
267
268#`installdirs'
269# It's useful to add a target named `installdirs' to create the
270# directories where files are installed, and their parent
271# directories. There is a script called `mkinstalldirs' which is
272# convenient for this; find it in the Texinfo package.You can use a
273# rule like this:
274#
275# # Make sure all installation directories, e.g. $(bindir) actually exist by
276# # making them if necessary.
277# installdirs: mkinstalldirs
278# $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) \
279# $(infodir) $(mandir)
280installdirs:
281 for dir in ${subdirs}; do \
282 cd $$dir; \
283 ${MAKE} installdirs; \
284 cd .. ;\
285 done
286
287
288
289# Cygnus extention:
290#
291# `Makefile'
292# Calls `./config.status' to rebuild the `Makefile' in this
293# directory.
294Makefile:
295 ${SHELL-/bin/sh} config.status