On 01.04.22 17:47, Michael Adler wrote:
> This is useful for CI and saves you the trouble of cloning the
> submodules and installing Python.
> 
> Signed-off-by: Michael Adler <[email protected]>
> ---
>  Makefile.am  |  5 +++++
>  configure.ac | 18 +++++++++++++-----
>  2 files changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 591f5b5..ab1d324 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -264,8 +264,13 @@ bg_printenvdir = $(top_srcdir)
>  bg_printenv: $(bg_setenv)
>       $(AM_V_at)$(LN_S) -f bg_setenv bg_printenv
>  
> +if COMPLETION
>  BASH_COMPLETION_FILES := $(top_builddir)/completion/bash/bg_setenv.bash 
> $(top_builddir)/completion/bash/bg_printenv.bash
>  ZSH_COMPLETION_FILES := $(top_builddir)/completion/zsh/_bg_setenv 
> $(top_builddir)/completion/zsh/_bg_printenv
> +else
> +BASH_COMPLETION_FILES :=
> +ZSH_COMPLETION_FILES :=
> +endif
>  
>  bashcompletiondir = ${datarootdir}/efibootguard/completion/bash
>  bashcompletion_DATA = $(BASH_COMPLETION_FILES)
> diff --git a/configure.ac b/configure.ac
> index 09d06d7..15d9de6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -194,11 +194,19 @@ AM_CONDITIONAL([BOOTLOADER], [test 
> "x$enable_bootloader" != "xno"])
>  PKG_INSTALLDIR
>  AC_SUBST(LIBEBGENV_VERSION, $(echo $VERSION | cut -dv -f2))
>  
> -dnl Python
> -AC_PATH_PROGS(PYTHON, [python3 python3.9 python3.8 python3.7 python3.6 
> python2.7 python2], no)
> -if test "x$PYTHON" = "xno"; then
> -     AC_MSG_ERROR([You need to install python])
> -fi
> +dnl shell completion
> +AC_ARG_ENABLE([completion],
> +    AS_HELP_STRING([--disable-completion], [do not generate shell completion 
> files]))
> +
> +AS_IF([test "x$enable_completion" != "xno"],
> +      [
> +      dnl Python
> +      AC_PATH_PROGS(PYTHON, [python3 python3.9 python3.8 python3.7 python3.6 
> python2.7 python2], no)
> +      if test "x$PYTHON" = "xno"; then
> +          AC_MSG_ERROR([You need to install python])
> +      fi
> +      ])
> +AM_CONDITIONAL([COMPLETION], [test "x$enable_completion" != "xno"])
>  
>  # 
> ------------------------------------------------------------------------------
>  AC_CONFIG_FILES([

Thanks, applied.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/dcc8ff3e-d854-8ea2-1ffc-988c15b134f9%40siemens.com.

Reply via email to