1 # Copyright (C) 1994,1995 Free Software Foundation, Inc.
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)
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.
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.
17 VERSION
= @GUILE_VERSION@
22 subdirs
=@build_subdirs@
23 dist_dirs
=@existingdirs@ doc
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.
45 @for
dir in
${subdirs}; do \
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.
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.
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.
64 subdir-inst-target
=install-nobuild
67 ${MAKE} subdir-inst-target
=install install-nobuild
70 for
dir in
${subdirs}; do \
72 ${MAKE} ${subdir-inst-target
}; \
77 # Delete all the installed files that the `install' target would
78 # create (but not the noninstalled files such as `make all' would
81 for
dir in
${subdirs}; do \
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
95 # Delete `.dvi' files here if they are not part of the distribution.
98 for
dir in
${subdirs}; do \
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
115 for
dir in
${subdirs}; do \
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.
128 for
dir in
${subdirs}; do \
130 ${MAKE} mostlyclean; \
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.
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.
147 for
dir in
${subdirs}; do \
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.
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.
166 --regex
='/SCM_PROC[^"]*"[^"]*"/' \
167 `find . -name '*.[ch]' -o -name '*.scm'`
170 # Generate any info files needed. The best way to write the rules
175 # foo.info: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
176 # $(MAKEINFO) $(srcdir)/foo.texi
178 # You must define the variable `MAKEINFO' in the Makefile. It
179 # should run the Makeinfo program, which is part of the Texinfo2
185 # Generate DVI files for all TeXinfo documentation. For example:
189 # foo.dvi: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
190 # $(TEXI2DVI) $(srcdir)/foo.texi
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.
197 for
dir in
${subdirs}; do \
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.
209 # For example, the distribution tar file of GCC version 1.40 unpacks
210 # into a subdirectory named `gcc-1.40'.
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.
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.
223 DIST_NAME
=guile-
${VERSION}
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}"; \
231 ${MAKE} dist-dir DISTDIR
="$${DISTDIR}" \
234 tar chf
${TAR_VERBOSE} - ${DIST_NAME} |
${GZIP} > "${DIST_NAME}.tar${GZIP_EXT}"
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.
243 for i in
${DISTFILES}; do \
244 ln
$(srcdir)/$${i} ${DISTDIR}; \
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.
253 for
dir in
${subdirs}; do \
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.
265 for
dir in
${subdirs}; do \
267 ${MAKE} installcheck; \
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
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)
285 for
dir in
${subdirs}; do \
287 ${MAKE} installdirs; \
296 # Calls `./config.status' to rebuild the `Makefile' in this
299 ${SHELL-
/bin
/sh
} config.status