diff --git a/Makefile b/Makefile
index 82d3ab409ae1d6f167aecd52f31c2945ae7eed14..7d35d14aa90721a70707b9ca3ed562b534e76d50 100644
--- a/Makefile
+++ b/Makefile
@@ -414,6 +414,7 @@ $(obj)System.map:	$(obj)u-boot
 # to regenerate the autoconf.mk file.
 $(obj)include/autoconf.mk: $(obj)include/config.h $(VERSION_FILE)
 	@$(XECHO) Generating include/autoconf.mk ; \
+	set -e ; \
 	: Generate the dependancies ; \
 	$(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \
 	: Extract the config macros ; \