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
################################################################################
# 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 \