[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2] build: C= build parameter for specifying different `.config` file
Hi Simon, thanks for this. Unfortunately, as it stands, this only works when we provide C= with a fully qualified path, at least when we run things within an application repo. Perhaps you could fix this in a v3? Thanks, -- Felipe On Mon, Mar 23, 2020 at 6:28 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> > --- > Changes v2: > -Fix conversion to fully qualified path > --- > Makefile | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > > diff --git a/Makefile b/Makefile > index b1e80303..36496577 100644 > --- a/Makefile > +++ b/Makefile > @@ -100,7 +100,7 @@ ifeq ($(CONFIG_UK_BASE),) > $(error "Invalid base directory (CONFIG_UK_BASE)") > endif > > -# A // APP_DIR > +# parameter A: APP_DIR ### > # Set A variable if not already done on the command line; > ifneq ("$(origin A)", "command line") > A := $(CONFIG_UK_BASE) > @@ -115,7 +115,7 @@ override CONFIG_UK_APP := $(A) > override APP_DIR := $(A) > override APP_BASE := $(A) > > -# BUILD_DIR > +# parameter O: BUILD_DIR ### > # Use O variable if set on the command line, otherwise use $(A)/build; > ifneq ("$(origin O)", "command line") > BUILD_DIR := $(shell mkdir -p $(CONFIG_UK_APP)/build && cd > $(CONFIG_UK_APP)/build >/dev/null && pwd) > @@ -126,6 +126,15 @@ $(if $(BUILD_DIR),, $(error could not create directory > "$(O)")) > endif > override BUILD_DIR := $(realpath $(patsubst %/,%,$(patsubst > %.,%,$(BUILD_DIR)))) > > +# parameter C: UK_CONFIG ### > +# Use C variable if set on the command line, otherwise use $(A)/.config; > +ifneq ("$(origin C)", "command line") > +UK_CONFIG := $(CONFIG_UK_APP)/.config > +else > +UK_CONFIG := $(realpath $(dir $(C)))/$(notdir $(C)) > +endif > +override CONFIG_DIR := $(realpath $(dir $(UK_CONFIG))) > + > # EPLAT_DIR (list of external platform libraries) > # Retrieved from P variable from the command line (paths separated by colon) > ifeq ("$(origin P)", "command line") > @@ -167,11 +176,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 > @@ -397,7 +404,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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |