[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v3 5/8] build: C= build parameter for specifying `.config` path



Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

On Fri, Mar 27, 2020 at 4:36 PM Simon Kuenzer <simon.kuenzer@xxxxxxxxx> wrote:
>
> Adds the make parameter `C=` which can be used to specify a different
> path for the configuration file `.config`. The parameter is optional
> and the default will select `.config` in the application directory.
>
> Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> ---
>  Makefile | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9e5f6414..de9f456a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -134,6 +134,21 @@ $(if $(BUILD_DIR),, $(error could not create directory 
> "$(_O)"))
>  BUILD_DIR := $(realpath $(patsubst %/,%,$(patsubst %.,%,$(BUILD_DIR))))
>  override O := $(BUILD_DIR)
>
> +# parameter C: UK_CONFIG ###
> +# Use C variable if set on the command line, otherwise use $(A)/.config;
> +ifneq ("$(origin C)", "command line")
> +ifeq ("$(origin C)", "undefined")
> +override C := $(CONFIG_UK_APP)/.config
> +endif
> +else
> +ifeq ("$(filter /%,$(C))", "")
> +$(error Path to configuration file (C) is not absolute)
> +endif
> +override C := $(realpath $(dir $(C)))/$(notdir $(C))
> +endif
> +UK_CONFIG  := $(C)
> +CONFIG_DIR := $(dir $(C))
> +
>  # EPLAT_DIR (list of external platform libraries)
>  # Retrieved from P variable from the command line (paths separated by colon)
>  ifeq ("$(origin P)", "command line")
> @@ -177,11 +192,9 @@ ELIB_DIR := $(realpath $(patsubst %/,%,$(patsubst 
> %.,%,$(ELIB_DIR))))
>
>  CONFIG_UK_PLAT        := $(CONFIG_UK_BASE)/plat/
>  CONFIG_UK_LIB         := $(CONFIG_UK_BASE)/lib/
> -CONFIG_DIR            := $(CONFIG_UK_APP)
>  CONFIG_CONFIG_IN      := $(CONFIG_UK_BASE)/Config.uk
>  CONFIG                := $(CONFIG_UK_BASE)/support/kconfig
>  CONFIGLIB            := $(CONFIG_UK_BASE)/support/kconfiglib
> -UK_CONFIG             := $(CONFIG_DIR)/.config
>  UK_CONFIG_OUT         := $(BUILD_DIR)/config
>  UK_GENERATED_INCLUDES := $(BUILD_DIR)/include
>  KCONFIG_DIR           := $(BUILD_DIR)/kconfig
> @@ -407,7 +420,8 @@ properclean:
>
>  distclean: properclean
>         $(call verbose_cmd,RM,config,$(RM) \
> -               $(UK_CONFIG) $(UK_CONFIG).old $(CONFIG_DIR)/..config.tmp \
> +               $(UK_CONFIG) $(UK_CONFIG).old \
> +               $(CONFIG_DIR)/.$(notdir $(UK_CONFIG)).tmp \
>                 $(CONFIG_DIR)/.auto.deps)
>
>  .PHONY: distclean properclean
> --
> 2.20.1
>
>
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.