mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Don't build the manpage unless there's a working Ruby setup.
This commit is contained in:
13
Makefile.am
13
Makefile.am
@@ -49,8 +49,19 @@ TEST_LOG_COMPILER = ${srcdir}/tests/run
|
|||||||
### Building the manpage
|
### Building the manpage
|
||||||
|
|
||||||
man_MANS = jq.1
|
man_MANS = jq.1
|
||||||
|
.PHONY: real_docs
|
||||||
|
if ENABLE_DOCS
|
||||||
jq.1: $(srcdir)/docs/content/3.manual/manual.yml
|
jq.1: $(srcdir)/docs/content/3.manual/manual.yml
|
||||||
( cd ${abs_srcdir}/docs; rake manpage ) > $@ || { rm -f $@; false; }
|
( cd ${abs_srcdir}/docs; rake manpage ) > $@ || { rm -f $@; false; }
|
||||||
|
real_docs:
|
||||||
|
true
|
||||||
|
else
|
||||||
|
jq.1: jq.1.default
|
||||||
|
cp $^ $@
|
||||||
|
real_docs:
|
||||||
|
@echo "Cannot build full manpage" > /dev/stderr
|
||||||
|
false
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -63,6 +74,8 @@ docs/site.yml: configure.ac
|
|||||||
install-binaries: $(BUILT_SOURCES)
|
install-binaries: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) install-exec
|
$(MAKE) $(AM_MAKEFLAGS) install-exec
|
||||||
|
|
||||||
|
# Ensure "make dist" fails when we can't build the real manpage
|
||||||
|
dist-hook: real_docs
|
||||||
|
|
||||||
# setup is only used by distribution developers, not package developers.
|
# setup is only used by distribution developers, not package developers.
|
||||||
# Still, as a matter of allowing patching, its not a bad idea to distribute
|
# Still, as a matter of allowing patching, its not a bad idea to distribute
|
||||||
|
26
configure.ac
26
configure.ac
@@ -26,18 +26,28 @@ if test "x$LEX" != xflex; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl Check for flex
|
|
||||||
AC_CHECK_PROGS(flex_cmd, flex)
|
|
||||||
if test x$flex_cmd = "x" ; then
|
|
||||||
AC_MSG_NOTICE([flex is required to patch jq.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for valgrind
|
dnl Check for valgrind
|
||||||
AC_CHECK_PROGS(valgrind_cmd, valgrind)
|
AC_CHECK_PROGS(valgrind_cmd, valgrind)
|
||||||
if test x$valgrind_cmd = "x" ; then
|
if test "x$valgrind_cmd" = "x" ; then
|
||||||
AC_MSG_NOTICE([valgrind is required to test jq.])
|
AC_MSG_WARN([valgrind is required to test jq.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
dnl Don't attempt to build docs if there's no Ruby lying around
|
||||||
|
AC_ARG_ENABLE([docs],
|
||||||
|
AC_HELP_STRING([--disable-docs], [don't build docs]))
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_docs" != "xno"],[
|
||||||
|
AC_CHECK_PROG(bundle_cmd, bundle)
|
||||||
|
AS_IF([test "x$bundle_cmd" = "x" || \
|
||||||
|
! ( cd ${srcdir}/docs; bundle check 2>/dev/null )],[
|
||||||
|
AC_MSG_WARN([no bundler])
|
||||||
|
enable_docs=no
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" != xno])
|
||||||
|
|
||||||
dnl AC_CONFIG_MACRO_DIR([m4])
|
dnl AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
AM_INIT_AUTOMAKE([-Wall])
|
AM_INIT_AUTOMAKE([-Wall])
|
||||||
|
0
jq.1.default
Normal file
0
jq.1.default
Normal file
Reference in New Issue
Block a user