summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-27 11:15:19 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-27 11:15:19 (GMT)
commitb39efd37a7fbf478072c72f82b4310c8620a4cea (patch) (unidiff)
treedf820ba6952b5f59d868a3ce1811a758b7891ab5
parenta5774356a1c12d1bcb55b6322710e347e1604fc9 (diff)
downloadgint-b39efd37a7fbf478072c72f82b4310c8620a4cea.tar.gz
gint-b39efd37a7fbf478072c72f82b4310c8620a4cea.tar.bz2
Fix builds without Guile.
* gint.m4: New option: doc-distrib. * gint.mk: Distribute generated files if doc-distrib was set. If not, don't distribute guile-procedures.texi and guile-procedures.txt, as this breaks builds without Guile. * guile.m4: Define GINT_COND_GUILE_OK conditional if Guile is present and selected for use. * README: Document doc-distrib.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--README27
-rw-r--r--gint.m44
-rw-r--r--gint.mk28
-rw-r--r--guile.m43
4 files changed, 52 insertions, 10 deletions
diff --git a/README b/README
index 58f9b9f..5975884 100644
--- a/README
+++ b/README
@@ -147,7 +147,8 @@ include ../gint/gint.mk
147The rules in `gint.mk` make certain assumptions about some `Makefile` 147The rules in `gint.mk` make certain assumptions about some `Makefile`
148variables. Namely, the following variables must be defined before 148variables. Namely, the following variables must be defined before
149including the file: +INCLUDES+, +EXTRA_DIST+, +CLEANFILES+, 149including the file: +INCLUDES+, +EXTRA_DIST+, +CLEANFILES+,
150+DISTCLEANFILES+, +SUFFIXES+, +BUILT_SOURCES+. See the 150+DISTCLEANFILES+ (or +MAINTAINERCLEANFILES+, if +doc-distrib+
151option is used), +SUFFIXES+, +BUILT_SOURCES+. See the
151http://sources.redhat.com/automake/automake.html[`Automake` documentation], 152http://sources.redhat.com/automake/automake.html[`Automake` documentation],
152for more info on these. If no special value is needed, define each 153for more info on these. If no special value is needed, define each
153of them to an empty string (see example below). 154of them to an empty string (see example below).
@@ -248,6 +249,19 @@ The following is a list of valid options:
248nodoc:: 249nodoc::
249Disable generation of +.doc+ files (see <<doc-snarfing, Doc snarfing>>). 250Disable generation of +.doc+ files (see <<doc-snarfing, Doc snarfing>>).
250 251
252doc-distrib::
253Add generated docfiles to distribution tarball. The following files are
254added: +\*.doc+, +\*.x+, +guile-procedures.texi+ and +guile-procedures.txt+.
255Normally they are not distributed and are recreated on each built. A minor
256drawback of this approach is that it requires installers to have *makeinfo*
257installed. If this option is given, the files will be included in the
258tarball and no rebuild will be necessary.
259+
260If this option is used, +MAINTAINERCLEANFILES+ must be defined before
261including +gint.mk+.
262+
263See also <<doc-snarfing, Doc snarfing>>.
264
251inc:: 265inc::
252Enable generation of `.inc` files. Each such file contains a set of 266Enable generation of `.inc` files. Each such file contains a set of
253`export` statements, one for each `SCM_DEFINE` in the corresponding 267`export` statements, one for each `SCM_DEFINE` in the corresponding
@@ -489,7 +503,16 @@ GINT_LDADD::
489Notice also that if your code does not require doc snarfing, you 503Notice also that if your code does not require doc snarfing, you
490may disable it by supplying the +nodoc+ option to the invocation 504may disable it by supplying the +nodoc+ option to the invocation
491of +GINT_INIT+. 505of +GINT_INIT+.
492 506
507By default, doc files are not included in the distribution tarball, which
508means that they will be recreated at build time. Creation of
509+guile-procedures.txt+ requires *makeinfo*, which may not always be present.
510To simplify built requirements, you can instruct +GINT+ to include the generated
511files to the distribution. To do so, add the +doc-distrib+ option to the
512invocation of +GINT_INIT+. The following files will be included in the
513distribution: +\*.doc+, +\*.x+, +guile-procedures.texi+ and
514+guile-procedures.txt+.
515
493[[guile-site-dir]] 516[[guile-site-dir]]
494THE `SITE DIRECTORY' PROBLEM 517THE `SITE DIRECTORY' PROBLEM
495---------------------------- 518----------------------------
diff --git a/gint.m4 b/gint.m4
index 4f3ff48..6e58893 100644
--- a/gint.m4
+++ b/gint.m4
@@ -62,7 +62,7 @@ dnl -------------------------------------------------------
62dnl DIR Gint submodule directory (defaults to 'gint') 62dnl DIR Gint submodule directory (defaults to 'gint')
63dnl OPTIONS A whitespace-separated list of options. Currently recognized 63dnl OPTIONS A whitespace-separated list of options. Currently recognized
64dnl options are: 'inc', 'std-site-dir','snarf-doc-filter', 64dnl options are: 'inc', 'std-site-dir','snarf-doc-filter',
65dnl 'nodoc', and version number. 65dnl 'nodoc', 'doc-distrib', and version number.
66dnl IF-FOUND What to do if Guile is present. 66dnl IF-FOUND What to do if Guile is present.
67dnl IF-NOT-FOUND What to do otherwise. 67dnl IF-NOT-FOUND What to do otherwise.
68dnl 68dnl
@@ -74,6 +74,8 @@ AC_DEFUN([GINT_INIT],[
74 AM_CONDITIONAL([GINT_COND_DOC],[_GINT_IF_OPTION_SET([nodoc],[false],[true])]) 74 AM_CONDITIONAL([GINT_COND_DOC],[_GINT_IF_OPTION_SET([nodoc],[false],[true])])
75 AM_CONDITIONAL([GINT_COND_SNARF_DOC_FILTER],dnl 75 AM_CONDITIONAL([GINT_COND_SNARF_DOC_FILTER],dnl
76 [_GINT_IF_OPTION_SET([snarf-doc-filter],[true],[false])]) 76 [_GINT_IF_OPTION_SET([snarf-doc-filter],[true],[false])])
77 AM_CONDITIONAL([GINT_COND_DOC_DISTRIB],dnl
78 [_GINT_IF_OPTION_SET([doc-distrib],[true],[false])])
77 GINT_CHECK_GUILE(m4_ifdef([_GINT_GUILE_VERSION],_GINT_GUILE_VERSION),[$3],[$4]) 79 GINT_CHECK_GUILE(m4_ifdef([_GINT_GUILE_VERSION],_GINT_GUILE_VERSION),[$3],[$4])
78]) 80])
79 81
diff --git a/gint.mk b/gint.mk
index 7befe5e..b8d03f3 100644
--- a/gint.mk
+++ b/gint.mk
@@ -14,11 +14,17 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>. 15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17if GINT_COND_GUILE_OK
17INCLUDES += @GUILE_INCLUDES@ 18INCLUDES += @GUILE_INCLUDES@
18 19
20if GINT_COND_DOC_DISTRIB
21 EXTRA_DIST += $(DOT_X_FILES)
22 MAINTAINERCLEANFILES += $(DOT_X_FILES)
23else
24 DISTCLEANFILES += $(DOT_X_FILES)
25endif
19BUILT_SOURCES += $(DOT_X_FILES) 26BUILT_SOURCES += $(DOT_X_FILES)
20 27
21DISTCLEANFILES += $(DOT_X_FILES)
22 28
23ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \ 29ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
24 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/' 30 --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
@@ -28,17 +34,24 @@ SUFFIXES += .x
28snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 34snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
29 35
30if GINT_COND_DOC 36if GINT_COND_DOC
31EXTRA_DIST += guile-procedures.texi guile-procedures.txt 37
38if GINT_COND_DOC_DISTRIB
39 EXTRA_DIST += guile-procedures.texi guile-procedures.txt $(DOT_DOC_FILES)
40 MAINTAINERCLEANFILES += \
41 $(DOT_DOC_FILES)\
42 guile-procedures.texi\
43 guile-procedures.txt
44else
45 DISTCLEANFILES += \
46 $(DOT_DOC_FILES)\
47 guile-procedures.texi\
48 guile-procedures.txt
49endif
32 50
33site_DATA += guile-procedures.txt 51site_DATA += guile-procedures.txt
34 52
35BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi 53BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi
36 54
37DISTCLEANFILES += \
38 $(DOT_DOC_FILES)\
39 guile-procedures.texi\
40 guile-procedures.txt
41
42SUFFIXES += .doc 55SUFFIXES += .doc
43 56
44if GINT_COND_SNARF_DOC_FILTER 57if GINT_COND_SNARF_DOC_FILTER
@@ -75,4 +88,5 @@ endif
75 88
76## Add -MG to make the .x magic work with auto-dep code. 89## Add -MG to make the .x magic work with auto-dep code.
77MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 90MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
91endif
78 92
diff --git a/guile.m4 b/guile.m4
index f695a21..e3bad16 100644
--- a/guile.m4
+++ b/guile.m4
@@ -152,8 +152,11 @@ AC_DEFUN([GINT_CHECK_GUILE],
152 [Guile version number: MAX*10 + MIN]) 152 [Guile version number: MAX*10 + MIN])
153 m4_if([$2],,,[$2]) 153 m4_if([$2],,,[$2])
154 fi 154 fi
155
155 m4_if([$3],,,[else 156 m4_if([$3],,,[else
156 $3]) 157 $3])
157 fi 158 fi
159
160 AM_CONDITIONAL([GINT_COND_GUILE_OK],[test $gint_guile_status = ok])
158]) 161])
159 162

Return to:

Send suggestions and report system problems to the System administrator.