]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
build: Import .config for noconfig targets 1152/head
authorRobert Kuban <robert.kuban@opensynergy.com>
Tue, 31 Oct 2023 16:18:23 +0000 (17:18 +0100)
committerRobert Kuban <robert.kuban@opensynergy.com>
Tue, 31 Oct 2023 22:37:33 +0000 (23:37 +0100)
Most of the noconfig_targets still need to import parts
of the .config if it is available:

- `COMMON_CONFIG_ENV` imports values from the .config
- `savedefconfig` uses `UK_ARCH`

Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Makefile

index a3fcddfef334f794136c95b4e2b63c673cb68fd4..344aa7e64e8c520385a4714b1d6f8ea60e7eb6fb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -380,11 +380,13 @@ EACHOLIB_LOCALS :=
 EACHOLIB_LOCALS-y :=
 
 # Pull in the user's configuration file
-ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 ifneq ("$(wildcard $(UK_CONFIG))","")
+# Import the .config even if we do not expect it to be complete:
+# COMMON_CONFIG_ENV imports some values, savedefconfig uses UK_ARCH, ...
 $(call verbose_info,Including $(UK_CONFIG)...)
 -include $(UK_CONFIG)
-UK_HAVE_DOT_CONFIG := y
+ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
+UK_HAVE_COMPLETE_DOT_CONFIG := y
 endif
 endif
 
@@ -570,7 +572,7 @@ endif
 # Compiler and linker tools
 ################################################################################
 ifeq ($(sub_make_exec), 1)
-ifeq ($(UK_HAVE_DOT_CONFIG),y)
+ifeq ($(UK_HAVE_COMPLETE_DOT_CONFIG),y)
 # Hide troublesome environment variables from sub processes
 unexport CONFIG_CROSS_COMPILE
 unexport CONFIG_LLVM_TARGET_ARCH
@@ -826,7 +828,7 @@ clean: clean-libs
                $(GDB_HELPER_LINKS) $(BUILD_DIR)/uk-gdb.py \
                $(UK_CLEAN) $(UK_CLEAN-y))
 
-else # !($(UK_HAVE_DOT_CONFIG),y)
+else # !($(UK_HAVE_COMPLETE_DOT_CONFIG),y)
 
 
 $(filter %config,$(MAKECMDGOALS)): $(BUILD_DIR)/Makefile
@@ -1078,7 +1080,7 @@ print-vars:
 print-version:
        @echo $(UK_FULLVERSION)
 
-ifeq ($(UK_HAVE_DOT_CONFIG),y)
+ifeq ($(UK_HAVE_COMPLETE_DOT_CONFIG),y)
 print-libs:
        @echo   $(foreach P,$(UK_PLATS) $(UK_PLATS-y),\
                $(if $(call qstrip,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y)),\