flesh out docs on multiple languages a bit more
[bpt/guile.git] / doc / ref / Makefile.am
1 ## Process this file with Automake to create Makefile.in
2 ##
3 ## Copyright (C) 1998, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
4 ##
5 ## This file is part of GUILE.
6 ##
7 ## GUILE is free software; you can redistribute it and/or modify it
8 ## under the terms of the GNU Lesser General Public License as
9 ## published by the Free Software Foundation; either version 3, or
10 ## (at your option) any later version.
11 ##
12 ## GUILE is distributed in the hope that it will be useful, but
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU Lesser General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU Lesser General Public
18 ## License along with GUILE; see the file COPYING.LESSER. If not,
19 ## write to the Free Software Foundation, Inc., 51 Franklin Street,
20 ## Fifth Floor, Boston, MA 02110-1301 USA
21
22 AUTOMAKE_OPTIONS = gnu
23
24 BUILT_SOURCES = lib-version.texi standard-library.texi
25
26 info_TEXINFOS = guile.texi
27
28 guile_TEXINFOS = preface.texi \
29 intro.texi \
30 libguile-program.texi \
31 scheme-intro.texi \
32 api-scm.texi \
33 api-snarf.texi \
34 api-smobs.texi \
35 scheme-ideas.texi \
36 api-data.texi \
37 api-procedures.texi \
38 api-macros.texi \
39 api-utility.texi \
40 api-binding.texi \
41 api-control.texi \
42 api-io.texi \
43 api-foreign.texi \
44 api-lalr.texi \
45 api-languages.texi \
46 api-evaluation.texi \
47 api-memory.texi \
48 api-modules.texi \
49 api-scheduling.texi \
50 api-options.texi \
51 api-i18n.texi \
52 api-debug.texi \
53 scheme-reading.texi \
54 scheme-indices.texi \
55 slib.texi \
56 posix.texi \
57 expect.texi \
58 scsh.texi \
59 tcltk.texi \
60 scheme-scripts.texi \
61 api-overview.texi \
62 scheme-debugging.texi \
63 scheme-using.texi \
64 indices.texi \
65 script-getopt.texi \
66 data-rep.texi \
67 repl-modules.texi \
68 srfi-modules.texi \
69 misc-modules.texi \
70 api-compound.texi \
71 autoconf.texi \
72 autoconf-macros.texi \
73 tools.texi \
74 history.texi \
75 vm.texi \
76 compiler.texi \
77 fdl.texi \
78 libguile-concepts.texi \
79 libguile-smobs.texi \
80 libguile-snarf.texi \
81 libguile-linking.texi \
82 libguile-extensions.texi \
83 api-init.texi \
84 mod-getopt-long.texi \
85 goops.texi \
86 goops-tutorial.texi \
87 effective-version.texi
88
89 ETAGS_ARGS = $(info_TEXINFOS) $(guile_TEXINFOS)
90
91 PICTURES = hierarchy.eps \
92 hierarchy.pdf \
93 hierarchy.png \
94 hierarchy.txt \
95 gds.eps \
96 gds.pdf \
97 gds.txt \
98 scheme.eps \
99 scheme.pdf \
100 scheme.txt \
101 mop.text
102
103 noinst_DATA = $(PICTURES)
104
105 EXTRA_DIST = ChangeLog-2008 $(PICTURES)
106
107 include $(top_srcdir)/am/pre-inst-guile
108
109 # Automated snarfing
110
111 autoconf.texi: autoconf-macros.texi
112 autoconf-macros.texi: $(top_srcdir)/meta/guile.m4
113 GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools \
114 snarf-guile-m4-docs $(top_srcdir)/meta/guile.m4 \
115 > $(srcdir)/$@
116
117 lib-version.texi: $(top_srcdir)/GUILE-VERSION
118 cat "$^" | grep '^LIBGUILE_.*_MAJOR' | \
119 sed 's/^LIBGUILE_\([A-Z0-9_]*\)_MAJOR=\([0-9]\+\)/@set LIBGUILE_\1_MAJOR \2/' \
120 > "$@"
121
122 MAINTAINERCLEANFILES = autoconf-macros.texi
123
124 # To allow "make distcheck" to succeed, lib-version.texi must either
125 # be cleaned or be included in the distribution. Or both - and in
126 # fact both are good. There's no point forcing a distribution build
127 # to regenerate lib-version.texi, because it can't possibly be
128 # different on the build machine than where the distribution was
129 # generated, so we might as well include it in the distribution.
130 EXTRA_DIST += lib-version.texi
131 # But when we want to get back to a clean tree, lib-version.texi
132 # should be cleaned.
133 CLEANFILES = lib-version.texi
134
135 # Support for snarfing docs out of Scheme modules.
136 snarf_doc = standard-library
137
138 $(snarf_doc).am: $(snarf_doc).scm
139 GUILE_AUTO_COMPILE=0 ; \
140 variable="`echo $(snarf_doc) | tr - _`_scm_files" ; \
141 "$(preinstguile)" -l "$(srcdir)/$(snarf_doc).scm" -c " \
142 (format #t \"# Automatically generated, do not edit.~%\") \
143 (format #t \"$$variable = \") \
144 (for-each (lambda (m) \
145 (format #t \"$$""(top_srcdir)/module/~a.scm \" \
146 (string-join (map symbol->string m) \"/\"))) \
147 (map car *modules*))" > "$@.tmp"
148 mv "$@.tmp" "$@"
149
150 # The following line leads to the definition of $(standard_library_scm_files).
151 include standard-library.am
152
153 $(snarf_doc).texi: $(standard_library_scm_files)
154 GUILE_AUTO_COMPILE=0 \
155 "$(preinstguile)" "$(srcdir)/make-texinfo.scm" \
156 "$(abs_srcdir)/$(snarf_doc).scm" > "$@.tmp"
157 mv "$@.tmp" "$@"
158
159 CLEANFILES += $(snarf_doc).texi
160 EXTRA_DIST += $(snarf_doc).scm make-texinfo.scm $(snarf_doc).texi $(snarf_doc).am