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
114 rm -f config.build-subdirs
117 for
dir in
${subdirs}; do \
125 # Like `clean', but may refrain from deleting a few files that people
126 # normally don't want to recompile. For example, the `mostlyclean'
127 # target for GCC does not delete `libgcc.a', because recompiling it
128 # is rarely necessary and takes a lot of time.
130 for
dir in
${subdirs}; do \
132 ${MAKE} mostlyclean; \
138 # Delete everything from the current directory that can be
139 # reconstructed with this Makefile. This typically includes
140 # everything deleted by distclean, plus more: C source files
141 # produced by Bison, tags tables, info files, and so on.
143 # One exception, however: `make realclean' should not delete
144 # `configure' even if `configure' can be remade using a rule in the
145 # Makefile. More generally, `make realclean' should not delete
146 # anything that needs to exist in order to run `configure' and then
147 # begin to build the program.
149 for
dir in
${subdirs}; do \
157 # Update a tags table for this program.
158 # We could allow each subdirectory to create its own TAGS file,
159 # and then use etags' --include option to incorporate them all by
160 # reference into a top-level TAGS file, but the --include option
161 # seems to be deprecated, and this works fine.
163 # The extra 'tags' name is useful --- 'make TAGS' won't run the
164 # commands if the file `TAGS' already exists, but `make tags'
165 # doesn't have that problem.
168 --regex
='/SCM_PROC[^"]*"[^"]*"/' \
169 `find . -name '*.[ch]' -o -name '*.scm'`
172 # Generate any info files needed. The best way to write the rules
177 # foo.info: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
178 # $(MAKEINFO) $(srcdir)/foo.texi
180 # You must define the variable `MAKEINFO' in the Makefile. It
181 # should run the Makeinfo program, which is part of the Texinfo2
187 # Generate DVI files for all TeXinfo documentation. For example:
191 # foo.dvi: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
192 # $(TEXI2DVI) $(srcdir)/foo.texi
194 # You must define the variable `TEXI2DVI' in the Makefile. It should
195 # run the program `texi2dvi', which is part of the Texinfo2
196 # distribution. Alternatively, write just the dependencies, and
197 # allow GNU Make to provide the command.
199 for
dir in
${subdirs}; do \
206 # Create a distribution tar file for this program. The tar file
207 # should be set up so that the file names in the tar file start with
208 # a subdirectory name which is the name of the package it is a
209 # distribution for. This name can include the version number.
211 # For example, the distribution tar file of GCC version 1.40 unpacks
212 # into a subdirectory named `gcc-1.40'.
214 # The easiest way to do this is to create a subdirectory
215 # appropriately named, use `ln' or `cp' to install the proper files
216 # in it, and then `tar' that subdirectory.
218 # The `dist' target should explicitly depend on all non-source files
219 # that are in the distribution, to make sure they are up to date in
220 # the distribution. *Ref Making Releases: (standards)Releases.
225 DIST_NAME
=guile-
${VERSION}
227 @echo
"Creating distribution for ${DIST_NAME}."
228 rm -rf
${DIST_NAME} ${DIST_NAME}.
tar${GZIP_EXT}
229 ${MAKE} dist-dir DISTDIR
="${DIST_NAME}"
230 for
dir in
${dist_dirs}; do \
231 ( DISTDIR
="../${DIST_NAME}/$${dir}"; \
233 ${MAKE} dist-dir DISTDIR
="$${DISTDIR}" \
236 tar chf
${TAR_VERBOSE} - ${DIST_NAME} |
${GZIP} > "${DIST_NAME}.tar${GZIP_EXT}"
239 # The `dist' target in the top-level Makefile uses this `dist-dir'
240 # target to select the appropriate files for distribution from the
241 # directory containing this Makefile.
245 for i in
${DISTFILES}; do \
246 ln
$(srcdir)/$${i} ${DISTDIR}; \
250 # Perform self-tests (if any). The user must build the program
251 # before running the tests, but need not install the program; you
252 # should write the self-tests so that they work when the program is
253 # built but not installed.
255 for
dir in
${subdirs}; do \
263 # Perform installation tests (if any). The user must build and
264 # install the program before running the tests. You should not
265 # assume that `$(bindir)' is in the search path.
267 for
dir in
${subdirs}; do \
269 ${MAKE} installcheck; \
275 # It's useful to add a target named `installdirs' to create the
276 # directories where files are installed, and their parent
277 # directories. There is a script called `mkinstalldirs' which is
278 # convenient for this; find it in the Texinfo package.You can use a
281 # # Make sure all installation directories, e.g. $(bindir) actually exist by
282 # # making them if necessary.
283 # installdirs: mkinstalldirs
284 # $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) \
285 # $(infodir) $(mandir)
287 for
dir in
${subdirs}; do \
289 ${MAKE} installdirs; \
298 # Calls `./config.status' to rebuild the `Makefile' in this
301 ${SHELL-
/bin
/sh
} config.status