build: Add --enable-doctool option
authorColin Walters <walters@verbum.org>
Tue, 21 Feb 2012 15:41:52 +0000 (10:41 -0500)
committerColin Walters <walters@verbum.org>
Tue, 21 Feb 2012 15:43:45 +0000 (10:43 -0500)
Makefile-tools.am
configure.ac
tests/Makefile.am

index f84de99..34d2a25 100644 (file)
@@ -1,5 +1,9 @@
 bin_PROGRAMS += g-ir-compiler g-ir-generate
-bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool
+bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
+
+if BUILD_DOCTOOL
+bin_SCRIPTS += g-ir-doc-tool
+endif
 
 EXTRA_DIST +=                          \
        tools/g-ir-scanner.in           \
index c311f66..0b67b08 100644 (file)
@@ -272,7 +272,11 @@ if test "x$os_win32" = "xyes"; then
   AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
 fi
 
-AM_CHECK_PYMOD(mako,,,[AC_MSG_ERROR(Could not find python module: mako)])
+AC_ARG_ENABLE(doctool,[  --enable-doctool           enable g-ir-doctool ], enable_doctool=$enableval,enable_doctool=no)
+if test x$enable_doctool != xno; then
+   AM_CHECK_PYMOD(mako,,,[AC_MSG_ERROR(Could not find python module: mako)])
+fi
+AM_CONDITIONAL(BUILD_DOCTOOL, test x$enable_doctool != xno)
 
 # Glib documentation
 
index 2d395a3..8a1aa26 100644 (file)
@@ -1,6 +1,12 @@
 include $(top_srcdir)/common.mk
 
-SUBDIRS = . scanner repository offsets warn doctool
+SUBDIRS = . scanner repository offsets warn
+DIST_SUBDIRS =
+if BUILD_DOCTOOL
+SUBDIRS += doctool
+else
+DIST_SUBDIRS += doctool
+endif
 
 EXTRA_DIST=
 BUILT_SOURCES=