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