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) (side-by-side diff)
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
@@ -149,3 +149,4 @@ variables. Namely, the following variables must be defined before
including the file: +INCLUDES+, +EXTRA_DIST+, +CLEANFILES+,
-+DISTCLEANFILES+, +SUFFIXES+, +BUILT_SOURCES+. See the
++DISTCLEANFILES+ (or +MAINTAINERCLEANFILES+, if +doc-distrib+
+option is used), +SUFFIXES+, +BUILT_SOURCES+. See the
http://sources.redhat.com/automake/automake.html[`Automake` documentation],
@@ -250,2 +251,15 @@ Disable generation of +.doc+ files (see <<doc-snarfing, Doc snarfing>>).
+doc-distrib::
+Add generated docfiles to distribution tarball. The following files are
+added: +\*.doc+, +\*.x+, +guile-procedures.texi+ and +guile-procedures.txt+.
+Normally they are not distributed and are recreated on each built. A minor
+drawback of this approach is that it requires installers to have *makeinfo*
+installed. If this option is given, the files will be included in the
+tarball and no rebuild will be necessary.
++
+If this option is used, +MAINTAINERCLEANFILES+ must be defined before
+including +gint.mk+.
++
+See also <<doc-snarfing, Doc snarfing>>.
+
inc::
@@ -491,3 +505,12 @@ may disable it by supplying the +nodoc+ option to the invocation
of +GINT_INIT+.
-
+
+By default, doc files are not included in the distribution tarball, which
+means that they will be recreated at build time. Creation of
++guile-procedures.txt+ requires *makeinfo*, which may not always be present.
+To simplify built requirements, you can instruct +GINT+ to include the generated
+files to the distribution. To do so, add the +doc-distrib+ option to the
+invocation of +GINT_INIT+. The following files will be included in the
+distribution: +\*.doc+, +\*.x+, +guile-procedures.texi+ and
++guile-procedures.txt+.
+
[[guile-site-dir]]
diff --git a/gint.m4 b/gint.m4
index 4f3ff48..6e58893 100644
--- a/gint.m4
+++ b/gint.m4
@@ -64,3 +64,3 @@ dnl OPTIONS A whitespace-separated list of options. Currently recognized
dnl options are: 'inc', 'std-site-dir','snarf-doc-filter',
-dnl 'nodoc', and version number.
+dnl 'nodoc', 'doc-distrib', and version number.
dnl IF-FOUND What to do if Guile is present.
@@ -76,2 +76,4 @@ AC_DEFUN([GINT_INIT],[
[_GINT_IF_OPTION_SET([snarf-doc-filter],[true],[false])])
+ AM_CONDITIONAL([GINT_COND_DOC_DISTRIB],dnl
+ [_GINT_IF_OPTION_SET([doc-distrib],[true],[false])])
GINT_CHECK_GUILE(m4_ifdef([_GINT_GUILE_VERSION],_GINT_GUILE_VERSION),[$3],[$4])
diff --git a/gint.mk b/gint.mk
index 7befe5e..b8d03f3 100644
--- a/gint.mk
+++ b/gint.mk
@@ -16,7 +16,13 @@
+if GINT_COND_GUILE_OK
INCLUDES += @GUILE_INCLUDES@
+if GINT_COND_DOC_DISTRIB
+ EXTRA_DIST += $(DOT_X_FILES)
+ MAINTAINERCLEANFILES += $(DOT_X_FILES)
+else
+ DISTCLEANFILES += $(DOT_X_FILES)
+endif
BUILT_SOURCES += $(DOT_X_FILES)
-DISTCLEANFILES += $(DOT_X_FILES)
@@ -30,3 +36,15 @@ snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS
if GINT_COND_DOC
-EXTRA_DIST += guile-procedures.texi guile-procedures.txt
+
+if GINT_COND_DOC_DISTRIB
+ EXTRA_DIST += guile-procedures.texi guile-procedures.txt $(DOT_DOC_FILES)
+ MAINTAINERCLEANFILES += \
+ $(DOT_DOC_FILES)\
+ guile-procedures.texi\
+ guile-procedures.txt
+else
+ DISTCLEANFILES += \
+ $(DOT_DOC_FILES)\
+ guile-procedures.texi\
+ guile-procedures.txt
+endif
@@ -36,7 +54,2 @@ BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi
-DISTCLEANFILES += \
- $(DOT_DOC_FILES)\
- guile-procedures.texi\
- guile-procedures.txt
-
SUFFIXES += .doc
@@ -77,2 +90,3 @@ endif
MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+endif
diff --git a/guile.m4 b/guile.m4
index f695a21..e3bad16 100644
--- a/guile.m4
+++ b/guile.m4
@@ -154,2 +154,3 @@ AC_DEFUN([GINT_CHECK_GUILE],
fi
+
m4_if([$3],,,[else
@@ -157,2 +158,4 @@ AC_DEFUN([GINT_CHECK_GUILE],
fi
+
+ AM_CONDITIONAL([GINT_COND_GUILE_OK],[test $gint_guile_status = ok])
])

Return to:

Send suggestions and report system problems to the System administrator.