mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-19 21:20:31 +02:00
mk: remove u-boot-specific git-clean handling
yes, make it generalised. use a new variable in mkhelper.cfg, gitclean and gitcleanargs not enabled by default, but u-boot enables it. i'm considering whether to use this by default, as it is the general policy of lbmk to clean everything just after a build, as builds are cached out of tree. this way, we can do re-builds safely for each project. there are probably a lot of subtle bugs that might be fixed if we used this the problem is that this is currently only used on lbmk.git, but not on libreboot release archives which lack .git directories; the main one is initialised in lbmk, but not in upstream sources. we could just initialise those. in fact, that is probably what i'm going to do. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
gitclean="y"
|
||||
gitcleanargs="-fdx"
|
||||
@@ -74,7 +74,7 @@ eval "`newvar autoconfargs autogenargs badhash badtghash bootstrapargs \
|
||||
build_depend buildtype cleanargs cmakedir cmd defconfig dest_dir elfdir \
|
||||
forcepull listfile makeargs mdir mkhelper mkhelpercfg mode postmake \
|
||||
premake project release rev srcdir target target_dir tree xarch xgcctree \
|
||||
xlang`"
|
||||
xlang gitclean gitcleanargs`"
|
||||
|
||||
main()
|
||||
{
|
||||
@@ -268,7 +268,7 @@ configure_project()
|
||||
|
||||
eval "`newvar autoconfargs badhash badtghash bootstrapargs \
|
||||
build_depend buildtype cleanargs makeargs mkhelper postmake \
|
||||
premake release xarch xgcctree xlang`"
|
||||
premake release xarch xgcctree xlang gitclean gitcleanargs`"
|
||||
|
||||
[ ! -f "$_tcfg" ] && \
|
||||
buildtype="auto"
|
||||
@@ -503,10 +503,11 @@ handle_makefile()
|
||||
$if_not_dry_build \
|
||||
x_ cp "$srcdir/$_copy" "$defconfig"; :
|
||||
|
||||
[ -e "$srcdir/.git" ] && [ "$project" = "u-boot" ] && \
|
||||
[ "$mode" = "distclean" ] && \
|
||||
$if_not_dry_build \
|
||||
x_ git -C "$srcdir" clean -fdx; :
|
||||
[ -e "$srcdir/.git" ] && [ "$gitclean" = "y" ] && \
|
||||
if [ "$mode" = "distclean" ] || [ "$mode" = "clean" ]; then
|
||||
$if_not_dry_build \
|
||||
x_ git -C "$srcdir" clean $gitcleanargs; :
|
||||
fi; :
|
||||
}
|
||||
|
||||
run_make_command()
|
||||
|
||||
Reference in New Issue
Block a user