mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
configure: absorb python3-mako check.
This is a better place for such checks than the Makefile, and we'll likely have more in future. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e99720344e
commit
0fdf22988d
2 changed files with 19 additions and 7 deletions
7
Makefile
7
Makefile
|
@ -271,13 +271,6 @@ check-hdr-include-order/%: %
|
||||||
check-makefile:
|
check-makefile:
|
||||||
@if [ x"$(CCANDIR)/config.h `find $(CCANDIR)/ccan -name '*.h' | grep -v /test/ | LC_ALL=C sort | tr '\n' ' '`" != x"$(CCAN_HEADERS) " ]; then echo CCAN_HEADERS incorrect; exit 1; fi
|
@if [ x"$(CCANDIR)/config.h `find $(CCANDIR)/ccan -name '*.h' | grep -v /test/ | LC_ALL=C sort | tr '\n' ' '`" != x"$(CCAN_HEADERS) " ]; then echo CCAN_HEADERS incorrect; exit 1; fi
|
||||||
|
|
||||||
# Check if they've installed 'mako' dependency, useful for
|
|
||||||
# keeping your build from clobbering itself
|
|
||||||
check-bolt-dependency:
|
|
||||||
@python3 -c "import mako"
|
|
||||||
|
|
||||||
BOLT_DEPS += check-bolt-dependency
|
|
||||||
|
|
||||||
# Experimental quotes quote the exact version.
|
# Experimental quotes quote the exact version.
|
||||||
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
||||||
CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)"
|
CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)"
|
||||||
|
|
19
configure
vendored
19
configure
vendored
|
@ -68,6 +68,22 @@ default_pytest()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require()
|
||||||
|
{
|
||||||
|
name="$1"
|
||||||
|
resolution="$2"
|
||||||
|
shift 2
|
||||||
|
|
||||||
|
echo -n "checking for $name... "
|
||||||
|
if "$@" 2>/dev/null; then
|
||||||
|
echo 'found'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo 'not found'
|
||||||
|
echo "$resolution" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
default_valgrind_setting()
|
default_valgrind_setting()
|
||||||
{
|
{
|
||||||
# Valgrind must accept all these options (might exit with error 7 though
|
# Valgrind must accept all these options (might exit with error 7 though
|
||||||
|
@ -209,6 +225,9 @@ if [ "$ASAN" = "1" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Doesn't set a var, but makes sure it exists
|
||||||
|
require 'python3-mako' "You need the mako module for python3: see doc/INSTALL.md" python3 -c 'import mako'
|
||||||
|
|
||||||
rm -f $CONFIG_VAR_FILE.$$
|
rm -f $CONFIG_VAR_FILE.$$
|
||||||
$CONFIGURATOR --extra-tests --autotools-style --var-file=$CONFIG_VAR_FILE.$$ --header-file=$CONFIG_HEADER --configurator-cc="$CONFIGURATOR_CC" "$CC" ${CWARNFLAGS-$BASE_WARNFLAGS} $CDEBUGFLAGS $COPTFLAGS <<EOF
|
$CONFIGURATOR --extra-tests --autotools-style --var-file=$CONFIG_VAR_FILE.$$ --header-file=$CONFIG_HEADER --configurator-cc="$CONFIGURATOR_CC" "$CC" ${CWARNFLAGS-$BASE_WARNFLAGS} $CDEBUGFLAGS $COPTFLAGS <<EOF
|
||||||
var=HAVE_GOOD_LIBSODIUM
|
var=HAVE_GOOD_LIBSODIUM
|
||||||
|
|
Loading…
Add table
Reference in a new issue