]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
Makefile.uk: Allow configuring with custom config file
authorStefan Jumarea <stefanjumarea02@gmail.com>
Mon, 3 Jul 2023 14:27:29 +0000 (17:27 +0300)
committerUnikraft <monkey@unikraft.io>
Sun, 16 Jul 2023 13:22:54 +0000 (13:22 +0000)
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 <stefanjumarea02@gmail.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #13

Makefile.uk

index 3cca77696da1209a86e7c8b730c44c36ac361c3f..c25803f3fe3c771634f7925657b278d279c7a98d 100644 (file)
@@ -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 \