diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-27 14:15:19 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-27 14:15:19 +0300 |
commit | b39efd37a7fbf478072c72f82b4310c8620a4cea (patch) | |
tree | df820ba6952b5f59d868a3ce1811a758b7891ab5 | |
parent | a5774356a1c12d1bcb55b6322710e347e1604fc9 (diff) | |
download | gint-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.
-rw-r--r-- | README | 27 | ||||
-rw-r--r-- | gint.m4 | 4 | ||||
-rw-r--r-- | gint.mk | 28 | ||||
-rw-r--r-- | guile.m4 | 3 |
4 files changed, 52 insertions, 10 deletions
@@ -147,7 +147,8 @@ include ../gint/gint.mk The rules in `gint.mk` make certain assumptions about some `Makefile` 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], for more info on these. If no special value is needed, define each of them to an empty string (see example below). @@ -248,6 +249,19 @@ The following is a list of valid options: nodoc:: 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:: Enable generation of `.inc` files. Each such file contains a set of `export` statements, one for each `SCM_DEFINE` in the corresponding @@ -489,7 +503,16 @@ GINT_LDADD:: Notice also that if your code does not require doc snarfing, you 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]] THE `SITE DIRECTORY' PROBLEM ---------------------------- @@ -62,7 +62,7 @@ dnl ------------------------------------------------------- dnl DIR Gint submodule directory (defaults to 'gint') 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. dnl IF-NOT-FOUND What to do otherwise. dnl @@ -74,6 +74,8 @@ AC_DEFUN([GINT_INIT],[ AM_CONDITIONAL([GINT_COND_DOC],[_GINT_IF_OPTION_SET([nodoc],[false],[true])]) AM_CONDITIONAL([GINT_COND_SNARF_DOC_FILTER],dnl [_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]) ]) @@ -14,11 +14,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +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) ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \ --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/' @@ -28,17 +34,24 @@ SUFFIXES += .x snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 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 site_DATA += guile-procedures.txt BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi -DISTCLEANFILES += \ - $(DOT_DOC_FILES)\ - guile-procedures.texi\ - guile-procedures.txt - SUFFIXES += .doc if GINT_COND_SNARF_DOC_FILTER @@ -75,4 +88,5 @@ endif ## Add -MG to make the .x magic work with auto-dep code. MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +endif @@ -152,8 +152,11 @@ AC_DEFUN([GINT_CHECK_GUILE], [Guile version number: MAX*10 + MIN]) m4_if([$2],,,[$2]) fi + m4_if([$3],,,[else $3]) fi + + AM_CONDITIONAL([GINT_COND_GUILE_OK],[test $gint_guile_status = ok]) ]) |