diff --git a/Makefile b/Makefile
index 386972890dbf0428b79b86a99a72952d232109c8..14f782ecb554924f8b98ab64b3f67529c9c73d8e 100644
--- a/Makefile
+++ b/Makefile
@@ -876,7 +876,7 @@ endif
 # Create a file containing the configuration options the image was built with
 quiet_cmd_cpp_cfg = CFG     $@
 cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-		-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
+	-DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
 
 MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
 	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index ea671378d0cb620bdc4d449a1a59a5d8dfcd9ed1..fd572f4b47b3e561914deb3b3c2fd5c52874d894 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -167,7 +167,7 @@ all:	$(ALL-y)
 
 quiet_cmd_cpp_cfg = CFG     $@
 cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-		-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
+	-DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
 
 $(obj)/$(SPL_BIN).cfg:	include/config.h
 	$(call if_changed,cpp_cfg)