diff options
-rw-r--r-- | util/newconfig/config.g | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/newconfig/config.g b/util/newconfig/config.g index 91c5bad4d2..eddff03092 100644 --- a/util/newconfig/config.g +++ b/util/newconfig/config.g @@ -2049,9 +2049,9 @@ def writeimagemakefile(image): file.write("# Get the value of TOP, VARIABLES, and several other variables.\n") file.write("include Makefile.settings\n\n") file.write("# Function to create an item like -Di586 or -DCONFIG_MAX_CPUS='1' or -Ui686\n") - file.write("D_item = $(if $(subst undefined,,$(origin $1)),-D$1$(if $($1),='$($1)',),-U$1)\n\n") + file.write("D_item = $(shell echo '$(if $(subst undefined,,$(origin $1)),\\#define $1$(if $($1), $($1),),\\#undef $1)' >> settings.h)\n\n") file.write("# Compute the value of CPUFLAGS here during make's first pass.\n") - file.write("CPUFLAGS := $(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))\n\n") + file.write("CPUFLAGS := $(strip $(shell echo '/* autogenerated */' > settings.h)$(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))--include=settings.h)\n\n") for i in image.getuserdefines(): file.write("%s\n" %i) |