summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-01-31 18:30:58 -0500
committerGaetan Nadon <memsize@videotron.ca>2010-02-05 13:05:07 -0500
commite87c5d8f8753a69f0b82c011c2b82bd53907bd4f (patch)
treeec65b9fecd66f613caaaa9525e8c62039e28507c
parentdb4fc91e01d51155322b8057b4dc60d56c3b26f2 (diff)
downloadxorg-lib-libXaw-e87c5d8f8753a69f0b82c011c2b82bd53907bd4f.tar.gz
doc: use new macros to control doc generation
Namely XORG_WITH_GROFF for the groff generation tool XORG_ENABLE_SPECS for the generation of functional specs Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac29
-rw-r--r--spec/Makefile.am27
2 files changed, 30 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index 7fbb5f2..36a6ea9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,10 +11,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
-# Require xorg-macros: XORG_WITH_LINT, XORG_DEFAULT_OPTIONS
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.6)
# Check for progs
AC_PROG_CC
@@ -22,32 +22,13 @@ AC_PROG_LIBTOOL
AC_PROG_AWK
AC_PROG_SED
-AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
-
-AC_MSG_CHECKING([whether to build documentation])
-AC_ARG_ENABLE(docs, AC_HELP_STRING([--enable-docs],
- [Enable building of Xaw documentation]),
- [build_docs="${enableval}"], [build_docs="auto"])
-
-if test "x${build_docs}" = xauto; then
- if test "x${GROFF}" = xnone ; then
- build_docs=no
- else
- build_docs=yes
- fi
-fi
-AC_MSG_RESULT([${build_docs}])
-if test "x${build_docs}" = xyes && test "x${GROFF}" = xnone ; then
- AC_MSG_ERROR([can't build documentation without groff])
-fi
-
-AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xyes])
-
# Need to call this explicitly since the first call to PKG_CHECK_MODULES
# is in an if statement, and later calls would break if it's skipped.
PKG_PROG_PKG_CONFIG
XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_GROFF
#
# fix libtool to set SONAME to libXaw.so.$major
diff --git a/spec/Makefile.am b/spec/Makefile.am
index 677cdd3..b09e85e 100644
--- a/spec/Makefile.am
+++ b/spec/Makefile.am
@@ -48,8 +48,30 @@ spec_input = $(spec_sources:%=$(srcdir)/%)
EXTRA_DIST = $(spec_sources) $(XIDXMACROS) block.awk fixindex.awk widg.idxmac.t
-if BUILD_DOCS
+if ENABLE_SPECS
+if HAVE_GROFF_MS
doc_DATA = widgets.ps widgets.index.ps widgets.txt widgets.html
+imagesdir = $(docdir)/images
+
+install-data-local:
+ test -z "$(imagesdir)" || $(MKDIR_P) "$(DESTDIR)$(imagesdir)"
+ @d="$(srcdir)/images/"; \
+ list=`ls $$d`; \
+ for p in $$list; do \
+ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(imagesdir)/$$p'"; \
+ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(imagesdir)/$$p"; \
+ done;
+
+uninstall-local:
+ @if test -n $(DESTDIR)$(imagesdir); then \
+ if test -d $(DESTDIR)$(imagesdir); then \
+ list=`ls $(DESTDIR)$(imagesdir)`; \
+ for p in $$list; do \
+ echo " rm -f '$(DESTDIR)$(imagesdir)/$$p'"; \
+ rm -f "$(DESTDIR)$(imagesdir)/$$p"; \
+ done \
+ fi; \
+ fi;
CLEANFILES = $(doc_DATA)
MOSTLYCLEANFILES = index.*
@@ -96,4 +118,5 @@ widgets.index.ps: widg.idxmac.t index.troff index.pageno
part: $(srcdir)/$(PART)
$(GROFF) -Tps $(GROFF_FLAGS) $(EVERYWHERE) $(srcdir)/$(PART) > $(PART).ps
-endif BUILD_DOCS
+endif HAVE_GROFF_MS
+endif ENABLE_SPECS