* Makefile.in (tags): New name for `TAGS' target, which will
[bpt/guile.git] / Makefile.in
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
17 VERSION = @GUILE_VERSION@
18
19 SHELL = /bin/sh
20
21 srcdir=@srcdir@
22 subdirs=@build_subdirs@
23 dist_dirs=@existingdirs@ doc
24
25 DISTFILES = COPYING \
26 ChangeLog \
27 GUILE-VERSION \
28 INSTALL \
29 NEWS \
30 README \
31 TODO \
32 Makefile.in \
33 configure \
34 configure.in \
35 config.sub \
36 config.guess \
37 install-sh
38
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.
44 all:
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 #
64 subdir-inst-target=install-nobuild
65
66 install: all
67 ${MAKE} subdir-inst-target=install install-nobuild
68
69 install-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).
80 uninstall:
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 #
97 clean:
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.
110 distclean:
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.
127 mostlyclean:
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.
146 realclean:
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.
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.
160 #
161 # The extra 'tags' name is useful --- 'make TAGS' won't run the
162 # commands if the file `TAGS' already exists, but `make tags'
163 # doesn't have that problem.
164 TAGS tags:
165 etags \
166 --regex='/SCM_PROC[^"]*"[^"]*"/' \
167 `find . -name '*.[ch]' -o -name '*.scm'`
168
169 #`info'
170 # Generate any info files needed. The best way to write the rules
171 # is as follows:
172 #
173 # info: foo.info
174 #
175 # foo.info: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
176 # $(MAKEINFO) $(srcdir)/foo.texi
177 #
178 # You must define the variable `MAKEINFO' in the Makefile. It
179 # should run the Makeinfo program, which is part of the Texinfo2
180 # distribution.
181 info:
182 cd doc; ${MAKE} info
183
184 #`dvi'
185 # Generate DVI files for all TeXinfo documentation. For example:
186 #
187 # dvi: foo.dvi
188 #
189 # foo.dvi: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
190 # $(TEXI2DVI) $(srcdir)/foo.texi
191 #
192 # You must define the variable `TEXI2DVI' in the Makefile. It should
193 # run the program `texi2dvi', which is part of the Texinfo2
194 # distribution. Alternatively, write just the dependencies, and
195 # allow GNU Make to provide the command.
196 dvi:
197 for dir in ${subdirs}; do \
198 cd $$dir; \
199 ${MAKE} dvi; \
200 cd .. ;\
201 done
202
203 #`dist'
204 # Create a distribution tar file for this program. The tar file
205 # should be set up so that the file names in the tar file start with
206 # a subdirectory name which is the name of the package it is a
207 # distribution for. This name can include the version number.
208 #
209 # For example, the distribution tar file of GCC version 1.40 unpacks
210 # into a subdirectory named `gcc-1.40'.
211 #
212 # The easiest way to do this is to create a subdirectory
213 # appropriately named, use `ln' or `cp' to install the proper files
214 # in it, and then `tar' that subdirectory.
215 #
216 # The `dist' target should explicitly depend on all non-source files
217 # that are in the distribution, to make sure they are up to date in
218 # the distribution. *Ref Making Releases: (standards)Releases.
219 .PHONY: dist
220 GZIP=gzip --best
221 GZIP_EXT=.gz
222 TAR_VERBOSE=v
223 DIST_NAME=guile-${VERSION}
224 dist: info
225 @echo "Creating distribution for ${DIST_NAME}."
226 rm -rf ${DIST_NAME} ${DIST_NAME}.tar${GZIP_EXT}
227 ${MAKE} dist-dir DISTDIR="${DIST_NAME}"
228 for dir in ${dist_dirs}; do \
229 ( DISTDIR="../${DIST_NAME}/$${dir}"; \
230 cd $${dir} && \
231 ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
232 ); \
233 done
234 tar chf${TAR_VERBOSE} - ${DIST_NAME} | ${GZIP} > "${DIST_NAME}.tar${GZIP_EXT}"
235 rm -rf ${DIST_NAME}
236
237 # The `dist' target in the top-level Makefile uses this `dist-dir'
238 # target to select the appropriate files for distribution from the
239 # directory containing this Makefile.
240 .PHONY: dist-dir
241 dist-dir:
242 mkdir ${DISTDIR}
243 for i in ${DISTFILES}; do \
244 ln $(srcdir)/$${i} ${DISTDIR}; \
245 done
246
247 #`check'
248 # Perform self-tests (if any). The user must build the program
249 # before running the tests, but need not install the program; you
250 # should write the self-tests so that they work when the program is
251 # built but not installed.
252 check:
253 for dir in ${subdirs}; do \
254 cd $$dir; \
255 ${MAKE} check; \
256 cd .. ;\
257 done
258
259
260 #`installcheck'
261 # Perform installation tests (if any). The user must build and
262 # install the program before running the tests. You should not
263 # assume that `$(bindir)' is in the search path.
264 installcheck:
265 for dir in ${subdirs}; do \
266 cd $$dir; \
267 ${MAKE} installcheck; \
268 cd .. ;\
269 done
270
271
272 #`installdirs'
273 # It's useful to add a target named `installdirs' to create the
274 # directories where files are installed, and their parent
275 # directories. There is a script called `mkinstalldirs' which is
276 # convenient for this; find it in the Texinfo package.You can use a
277 # rule like this:
278 #
279 # # Make sure all installation directories, e.g. $(bindir) actually exist by
280 # # making them if necessary.
281 # installdirs: mkinstalldirs
282 # $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) \
283 # $(infodir) $(mandir)
284 installdirs:
285 for dir in ${subdirs}; do \
286 cd $$dir; \
287 ${MAKE} installdirs; \
288 cd .. ;\
289 done
290
291
292
293 # Cygnus extention:
294 #
295 # `Makefile'
296 # Calls `./config.status' to rebuild the `Makefile' in this
297 # directory.
298 Makefile:
299 ${SHELL-/bin/sh} config.status