]> git.sur5r.net Git - u-boot/commitdiff
Makefile: fix "error: version_autogenerated.h: No such file or directory"
authorWolfgang Denk <wd@denx.de>
Tue, 13 May 2008 21:15:52 +0000 (23:15 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 13 May 2008 21:15:52 +0000 (23:15 +0200)
Signed-off-by: Wolfgang Denk <wd@denx.de>
Makefile
include/version.h

index 6783fec407c6c270c239f9a732478b6a0277fece..6548f8eb057c76fc041975d45ade01fa3c40df60 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -424,13 +424,19 @@ $(obj)System.map: $(obj)u-boot
 # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
 # the dep file is only include in this top level makefile to determine when
 # to regenerate the autoconf.mk file.
-$(obj)include/autoconf.mk: $(obj)include/config.h
-       @$(XECHO) Generating include/autoconf.mk ; \
+$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
+       @$(XECHO) Generating $@ ; \
        set -e ; \
        : Generate the dependancies ; \
-       $(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \
+       $(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
+               -MQ $(obj)include/autoconf.mk include/common.h > $@
+
+$(obj)include/autoconf.mk: $(obj)include/config.h
+       @$(XECHO) Generating $@ ; \
+       set -e ; \
        : Extract the config macros ; \
-       $(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed > $@
+       $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
+               sed -n -f tools/scripts/define2mk.sed > $@
 
 sinclude $(obj)include/autoconf.mk.dep
 
index b56d2e9900b8309c66d3f265ab73b03ebd46137e..a34291adc5d9ae8ace49cd18e8613c91b9420da9 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef        __VERSION_H__
 #define        __VERSION_H__
 
+#ifndef DO_DEPS_ONLY
 #include "version_autogenerated.h"
+#endif
 
 #endif /* __VERSION_H__ */