From 4ddebbc035f4b5a7ed77af3f94a6035b600d4fac Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 21 Mar 2017 11:10:58 -0400 Subject: [PATCH] Add SRCURI configuration for manual * configure.ac (SET_SRCURI): Provide source root to manual. (--with-srcuri): Add configure option. * doc/config.texi.in (SET_SRCURI): Add configuration value. * doc/liza.texi: Add warning if SET_SRCURI is unset when DEVNOTES is set. --- configure.ac | 10 ++++++++++ doc/config.texi.in | 3 +++ doc/liza.texi | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/configure.ac b/configure.ac index 1f13a55..641d840 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,16 @@ AC_ARG_ENABLE( AC_SUBST([SET_DEVNOTES], [$set_devnotes]) +set_srcuri='@c @set SRCURI ' +AC_ARG_WITH( + [srcuri], + [AS_HELP_STRING([--with-srcuri], + [root URI for Liza source code cross-references + (disabled by default)])], + [test "x$withval" = x || set_srcuri="@set SRCURI $withval"]) + +AC_SUBST([SET_SRCURI], [$set_srcuri]) + # generate files from their *.in counterparts AC_CONFIG_FILES([Makefile package.json doc/Makefile doc/config.texi diff --git a/doc/config.texi.in b/doc/config.texi.in index 314c443..c575442 100644 --- a/doc/config.texi.in +++ b/doc/config.texi.in @@ -2,3 +2,6 @@ @c whether to include notes for Liza developers @SET_DEVNOTES@ + +@c URI to root of source tree for manual cross-references +@SET_SRCURI@ diff --git a/doc/liza.texi b/doc/liza.texi index bce42b7..d4d42d6 100644 --- a/doc/liza.texi +++ b/doc/liza.texi @@ -58,6 +58,15 @@ Free Documentation License''. to @command{configure}.} For an index of notes@comma{} see @ref{Developer Notes Index}.} +@ifclear SRCURI +@devnotice{ + Location of Liza source code is unknown. + Source cross-references have been disabled.@footnote{ + To enable source code cross-references, provide the URI to the + root (as you want it to be seen in the manual) via + @option{--with-srcuri=} to @command{configure}.}} +@end ifclear + @contents @ifnottex