summaryrefslogtreecommitdiffabout
path: root/gint.mk
authorSergey Poznyakoff <gray@gnu.org.ua>2010-04-14 07:26:28 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-04-14 07:26:28 (GMT)
commit4254b0590e609b82dac3d688ecb401c9eefb7e25 (patch) (side-by-side diff)
treef565e3daf877d35cffc92ffa3abf45696e5e62c0 /gint.mk
parentc6a7620deb7e3e139329e2daad31d4071f01b43b (diff)
downloadgint-4254b0590e609b82dac3d688ecb401c9eefb7e25.tar.gz
gint-4254b0590e609b82dac3d688ecb401c9eefb7e25.tar.bz2
Improve doc generation. Allow for rebootstrapping of a packaged distribution.
* Makefile.am (EXTRA_DIST): Add all files, to make possible rebootstrapping of a packaged distribution. [GINT_COND_DOC]: Protect generation of the doc files. * gint.m4: Call AM_PROG_LEX unconditionally. The reasoning is the same as above. (GINT_COND_DOC): New condition, controlled by the `nodoc' option. * gint.mk [GINT_COND_DOC]: Move all rules regarding doc files under this conditional. (snarfcppopts): New variable. (.c.doc, .c.x): Pass $(snarfcppopts) to the cc invocation. * README: Update. * .gitignore: Update.
Diffstat (limited to 'gint.mk') (more/less context) (ignore whitespace changes)
-rw-r--r--gint.mk48
1 files changed, 28 insertions, 20 deletions
diff --git a/gint.mk b/gint.mk
index 3d5a6a7..74b20ca 100644
--- a/gint.mk
+++ b/gint.mk
@@ -16,20 +16,30 @@
INCLUDES += @GUILE_INCLUDES@
+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/'
+
+SUFFIXES += .x
+
+if GINT_COND_DOC
EXTRA_DIST += guile-procedures.texi guile-procedures.txt
site_DATA += guile-procedures.txt
-BUILT_SOURCES=$(DOT_X_FILES) $(DOT_DOC_FILES) guile-procedures.texi
+BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi
-DISTCLEANFILES +=\
- $(DOT_X_FILES)\
+DISTCLEANFILES += \
$(DOT_DOC_FILES)\
guile-procedures.texi\
guile-procedures.txt
-ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
- --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
+SUFFIXES += .doc
+
+snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
if GINT_COND_SNARF_DOC_FILTER
GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/snarf-doc-filter --snarfer
@@ -37,17 +47,23 @@ else
GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/clexer --snarfer
endif
-SUFFIXES += .x .doc
+.c.doc:
+ $(AM_V_GEN)$(CC) -DSCM_MAGIC_SNARF_DOCS $(snarfcppopts) -E $< | \
+ $(GUILE_DOC_SNARF) -o $@ || { rm $@; false; }
+
+guile-procedures.texi: $(DOT_DOC_FILES)
+ $(AM_V_GEN)cat $(DOT_DOC_FILES) | \
+ $(GUILE_TOOLS) snarf-check-and-output-texi > $@
+
+guile-procedures.txt: guile-procedures.texi
+ $(AM_V_GEN) rm -f $@; \
+ $(MAKEINFO) --force -o $@ guile-procedures.texi || test -f $@
+endif
.c.x:
$(AM_V_GEN)AWK=$(AWK) \
$(GUILE_SNARF) -o $@ \
- $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-
-.c.doc:
- $(AM_V_GEN)$(CC) -DSCM_MAGIC_SNARF_DOCS \
- $(DEFS) $(INCLUDES) $(CPPFLAGS) -E $< | \
- $(GUILE_DOC_SNARF) -o $@ || { rm $@; false; }
+ $< $(snarfcppopts)
if GINT_COND_INC
SUFFIXES += .inc
@@ -57,14 +73,6 @@ CLEANFILES += *.inc
$(AM_V_GEN)$(top_srcdir)/$(GINT_MODULE_DIR)/extract-exports -o $@ $<
endif
-guile-procedures.texi: $(DOT_DOC_FILES)
- $(AM_V_GEN)cat $(DOT_DOC_FILES) | \
- $(GUILE_TOOLS) snarf-check-and-output-texi > $@
-
-guile-procedures.txt: guile-procedures.texi
- $(AM_V_GEN) rm -f $@; \
- $(MAKEINFO) --force -o $@ guile-procedures.texi || test -f $@
-
## Add -MG to make the .x magic work with auto-dep code.
MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)

Return to:

Send suggestions and report system problems to the System administrator.