From: Stefan Jumarea Date: Mon, 3 Jul 2023 14:27:29 +0000 (+0300) Subject: Makefile.uk: Allow configuring with custom config file X-Git-Tag: RELEASE-0.14.0~8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6a2ee037e14deaafd08a9ab9462e2e955469ea22;p=unikraft%2Flibs%2Fpython3.git 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 --- 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 \