update/trees: support custom make/autogen argument
this is now used in grub, for the FS_PAYLOAD_MODULES option in the make command lbmk should generalise as much logic as possible. in some parts of it, logic is hurrently hardcoded, specific to a given project that lbmk uses, but lbmk is essentially a source-based package manager, like what you might find on a small linux distro, so we need to try to be as generic as possible. lbmk is the "build system of build systems", so it has to work generically with as many of them as possible Signed-off-by: Leah Rowe <leah@libreboot.org>9020vga
parent
c6a0e4952e
commit
4c9ee172be
|
@ -1,2 +1,3 @@
|
||||||
bootstrapargs="--gnulib-srcdir=gnulib/ --no-git"
|
bootstrapargs="--gnulib-srcdir=gnulib/ --no-git"
|
||||||
autoconfargs="--with-platform=coreboot"
|
autoconfargs="--with-platform=coreboot"
|
||||||
|
makeargs="FS_PAYLOAD_MODULES=\"\""
|
||||||
|
|
|
@ -12,7 +12,7 @@ set -u -e
|
||||||
|
|
||||||
eval "$(setvars "" xarch cfgsdir codedir config config_name xlang mode \
|
eval "$(setvars "" xarch cfgsdir codedir config config_name xlang mode \
|
||||||
elfdir listfile project target target_dir targets tree _f target1 \
|
elfdir listfile project target target_dir targets tree _f target1 \
|
||||||
bootstrapargs autoconfargs cmakedir)"
|
bootstrapargs autoconfargs cmakedir makeargs autogenargs)"
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ run_make_command()
|
||||||
x_ printf "%s\n" "${version%%-*}" \
|
x_ printf "%s\n" "${version%%-*}" \
|
||||||
> "${codedir}/.coreboot-version"
|
> "${codedir}/.coreboot-version"
|
||||||
|
|
||||||
make $mode -j$(nproc) FS_PAYLOAD_MODULES="" -C "$codedir" || \
|
make $mode -j$(nproc) $makeargs -C "$codedir" || \
|
||||||
err "run_make $codedir: !make $mode"
|
err "run_make $codedir: !make $mode"
|
||||||
|
|
||||||
[ "$mode" != "clean" ] && return 0
|
[ "$mode" != "clean" ] && return 0
|
||||||
|
@ -239,7 +239,7 @@ check_autoconf()
|
||||||
_cfgopt=""
|
_cfgopt=""
|
||||||
cd "${1}" || err "!cd $1"
|
cd "${1}" || err "!cd $1"
|
||||||
[ -f "bootstrap" ] && x_ ./bootstrap $bootstrapargs
|
[ -f "bootstrap" ] && x_ ./bootstrap $bootstrapargs
|
||||||
[ -f "autogen.sh" ] && x_ ./autogen.sh
|
[ -f "autogen.sh" ] && x_ ./autogen.sh ${autogenargs}
|
||||||
[ -f "configure" ] && x_ ./configure $autoconfargs; return 0
|
[ -f "configure" ] && x_ ./configure $autoconfargs; return 0
|
||||||
) || err "can't bootstrap project: $1"
|
) || err "can't bootstrap project: $1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue