aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-01 19:42:56 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-01 19:46:09 +0100
commitb08f34f43db2c681c1fdd3f7d375d359c86306d5 (patch)
tree22a54b6fab1c240c34bdf72e630a647be74097b5
parentf1e473480062295181b9641990f48be17a9a892d (diff)
downloadpaludis-b08f34f43db2c681c1fdd3f7d375d359c86306d5.tar.gz
paludis-b08f34f43db2c681c1fdd3f7d375d359c86306d5.tar.xz
Add --enable-prebuilt-documentation
-rw-r--r--configure.ac33
-rw-r--r--src/clients/accerso/Makefile.am8
-rw-r--r--src/clients/appareo/Makefile.am8
-rw-r--r--src/clients/cave/Makefile.am29
-rw-r--r--src/clients/instruo/Makefile.am8
5 files changed, 63 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index f47a872..2ac85d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -985,19 +985,36 @@ AC_SUBST([DOXYGEN_TAG_FILES])
dnl }}}
dnl {{{ asciidoc & xmlto
-AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], [yes], [no])
+AC_MSG_CHECKING([whether to use pre-built documentation])
+AC_ARG_ENABLE([prebuilt-documentation],
+ AS_HELP_STRING([--enable-prebuilt-documentation], [Use prebuilt documentation]),
+ [USE_PREBUILT_DOCUMENTATION=$enableval
+ AC_MSG_RESULT([$enableval])],
+ USE_PREBUILT_DOCUMENTATION=no
+ AC_MSG_RESULT([no]))
+
+AM_CONDITIONAL([USE_PREBUILT_DOCUMENTATION], test "x$USE_PREBUILT_DOCUMENTATION" = "xyes")
+
+if test x$USE_PREBUILT_DOCUMENTATION = xno ; then
+ AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], [yes], [no])
+ if test "x$HAVE_ASCIIDOC" = xno ; then
+ AC_MSG_ERROR([asciidoc not found])
+ fi
+
+ AC_CHECK_PROG(HAVE_XMLTO, [xmlto], [yes], [no])
+ if test "x$HAVE_XMLTO" = xno ; then
+ AC_MSG_ERROR([xmlto not found])
+ fi
+else
+ HAVE_ASCIIDOC=no
+ HAVE_XMLTO=no
+fi
+
AC_SUBST([HAVE_ASCIIDOC])
AM_CONDITIONAL([HAVE_ASCIIDOC], test "x$HAVE_ASCIIDOC" = "xyes")
-if test "x$HAVE_ASCIIDOC" = xno ; then
- AC_MSG_ERROR([asciidoc not found])
-fi
-AC_CHECK_PROG(HAVE_XMLTO, [xmlto], [yes], [no])
AC_SUBST([HAVE_XMLTO])
AM_CONDITIONAL([HAVE_XMLTO], test "x$HAVE_XMLTO" = "xyes")
-if test "x$HAVE_XMLTO" = xno ; then
- AC_MSG_ERROR([xmlto not found])
-fi
dnl }}}
dnl {{{
diff --git a/src/clients/accerso/Makefile.am b/src/clients/accerso/Makefile.am
index 792b8f0..6be9fd7 100644
--- a/src/clients/accerso/Makefile.am
+++ b/src/clients/accerso/Makefile.am
@@ -11,7 +11,6 @@ DEFS= \
SUBDIRS = .
bin_PROGRAMS = accerso
-noinst_PROGRAMS = man-accerso
man_MANS = accerso.1
SUFFIXES = .1 .txt .xml .html-man-fragment
@@ -20,6 +19,11 @@ man_MANS_txts = accerso.txt
man_MANS_xmls = accerso.xml
man_MANS_html_man_fragments = accerso.html-man-fragment
+if USE_PREBUILT_DOCUMENTATION
+else
+
+noinst_PROGRAMS = man-accerso
+
$(man_MANS_txts) : man-accerso
if ! ./man-accerso `echo $@ | sed -e 's.^accerso-*..' -e 's,\.txt$$,,'` > $@ ; then rm -f $@ ; exit 1 ; fi
@@ -50,6 +54,8 @@ man_accerso_LDADD = \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
+endif
+
accerso_SOURCES = \
command_line.hh command_line.cc \
accerso.cc
diff --git a/src/clients/appareo/Makefile.am b/src/clients/appareo/Makefile.am
index 5c99d4f..ef50dca 100644
--- a/src/clients/appareo/Makefile.am
+++ b/src/clients/appareo/Makefile.am
@@ -11,7 +11,6 @@ DEFS= \
SUBDIRS = .
bin_PROGRAMS = appareo
-noinst_PROGRAMS = man-appareo
man_MANS = appareo.1
SUFFIXES = .1 .txt .xml .html-man-fragment
@@ -20,6 +19,11 @@ man_MANS_txts = appareo.txt
man_MANS_xmls = appareo.xml
man_MANS_html_man_fragments = appareo.html-man-fragment
+if USE_PREBUILT_DOCUMENTATION
+else
+
+noinst_PROGRAMS = man-appareo
+
$(man_MANS_txts) : man-appareo
if ! ./man-appareo `echo $@ | sed -e 's.^appareo-*..' -e 's,\.txt$$,,'` > $@ ; then rm -f $@ ; exit 1 ; fi
@@ -50,6 +54,8 @@ man_appareo_LDADD = \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
+endif
+
appareo_SOURCES = \
command_line.hh command_line.cc \
appareo.cc
diff --git a/src/clients/cave/Makefile.am b/src/clients/cave/Makefile.am
index 4598e2a..a96e563 100644
--- a/src/clients/cave/Makefile.am
+++ b/src/clients/cave/Makefile.am
@@ -15,8 +15,6 @@ SUBDIRS = .
bin_PROGRAMS = cave
-noinst_PROGRAMS = man-cave
-
# When adding commands, you need to add to both command_MANS and
# libcave_a_SOURCES. You should also update command_factory.cc,
# doc/clients/Makefile.am and .gitignore.
@@ -93,6 +91,11 @@ command_MANS_html_man_fragments = $(command_MANS_txts:.txt=.html-man-fragment)
SUFFIXES = .1 .txt .xml .html-man-fragment
+if USE_PREBUILT_DOCUMENTATION
+else
+
+noinst_PROGRAMS = man-cave
+
$(command_MANS_txts) : man-cave
if ! env \
CAVE_FORMATS_CONF="/dev/null" \
@@ -114,27 +117,29 @@ $(command_MANS_txts) : man-cave
$@-dir/index.html > $@
rm -fr $@-dir
-cave_SOURCES = \
- cave.cc
+man_cave_SOURCES = \
+ man_cave.cc
-cave_LDADD = \
+man_cave_LDADD = \
libcave.a \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/resolver/libpaludisresolver.a \
- $(top_builddir)/src/output/liboutput.a \
- $(DYNAMIC_LD_LIBS)
+ $(top_builddir)/paludis/resolver/libpaludisresolver.a
-man_cave_SOURCES = \
- man_cave.cc
+endif
-man_cave_LDADD = \
+cave_SOURCES = \
+ cave.cc
+
+cave_LDADD = \
libcave.a \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/resolver/libpaludisresolver.a
+ $(top_builddir)/paludis/resolver/libpaludisresolver.a \
+ $(top_builddir)/src/output/liboutput.a \
+ $(DYNAMIC_LD_LIBS)
noinst_LIBRARIES = libcave.a
diff --git a/src/clients/instruo/Makefile.am b/src/clients/instruo/Makefile.am
index 4c565f6..35ea242 100644
--- a/src/clients/instruo/Makefile.am
+++ b/src/clients/instruo/Makefile.am
@@ -11,7 +11,6 @@ DEFS= \
SUBDIRS = .
bin_PROGRAMS = instruo
-noinst_PROGRAMS = man-instruo
man_MANS = instruo.1
SUFFIXES = .1 .txt .xml
@@ -20,6 +19,11 @@ man_MANS_txts = instruo.txt
man_MANS_xmls = instruo.xml
man_MANS_html_man_fragments = instruo.html-man-fragment
+if USE_PREBUILT_DOCUMENTATION
+else
+
+noinst_PROGRAMS = man-instruo
+
$(man_MANS_txts) : man-instruo
if ! ./man-instruo `echo $@ | sed -e 's.^instruo-*..' -e 's,\.txt$$,,'` > $@ ; then rm -f $@ ; exit 1 ; fi
@@ -50,6 +54,8 @@ man_instruo_LDADD = \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
+endif
+
instruo_SOURCES = \
command_line.hh command_line.cc \
instruo.cc