From 6a2ee037e14deaafd08a9ab9462e2e955469ea22 Mon Sep 17 00:00:00 2001 From: Stefan Jumarea Date: Mon, 3 Jul 2023 17:27:29 +0300 Subject: [PATCH] Makefile.uk: Allow configuring with custom config file The `.config.orig` rule does a backup of the config file before changing it to set `CONFIG_STACK_SIZE_PAGE_ORDER=10`. This used a hardcoded path to the default `.config` file instead of `$(C)`, which can be set to a custom one. Using a hardcoded path will fail if trying to build with a different config file than the default one (i.e. using `make C=path-to-config`). One of the usecases is `kraftkit`, which uses `.config.python3...` instead of the default `.config` file. Signed-off-by: Stefan Jumarea Reviewed-by: Cezar Craciunoiu Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #13 --- Makefile.uk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.uk b/Makefile.uk index 3cca776..c25803f 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -460,10 +460,10 @@ LIBPYTHON3_EXTENSIONS_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_ZLIB) += $(LIBPYTHON3_S ################################################################################ # Customize config: configure stack size -$(APP_BASE)/.config.orig: $(APP_BASE)/.config +$(APP_BASE)/.config.orig: $(call verbose_cmd,CONFIG,libpython3: $(notdir $@), \ - cp $(APP_BASE)/.config $@ && \ - sed -i 's/^CONFIG_STACK_SIZE_PAGE_ORDER=.*$$/CONFIG_STACK_SIZE_PAGE_ORDER=10/g' $(APP_BASE)/.config) + cp $(C) $@ && \ + sed -i 's/^CONFIG_STACK_SIZE_PAGE_ORDER=.*$$/CONFIG_STACK_SIZE_PAGE_ORDER=10/g' $(C)) LIBPYTHON3_PREPARED_DEPS = \ $(APP_BASE)/.config.orig \ -- 2.39.5