Makefile: fix "error: version_autogenerated.h: No such file or directory"

Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
Wolfgang Denk 2008-05-13 23:15:52 +02:00
parent 65dcfa7920
commit 1510b82d50
2 changed files with 12 additions and 4 deletions

View File

@ -424,13 +424,19 @@ $(obj)System.map: $(obj)u-boot
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. # 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 # the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file. # to regenerate the autoconf.mk file.
$(obj)include/autoconf.mk: $(obj)include/config.h $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
@$(XECHO) Generating include/autoconf.mk ; \ @$(XECHO) Generating $@ ; \
set -e ; \ set -e ; \
: Generate the dependancies ; \ : 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 ; \ : 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 sinclude $(obj)include/autoconf.mk.dep

View File

@ -24,6 +24,8 @@
#ifndef __VERSION_H__ #ifndef __VERSION_H__
#define __VERSION_H__ #define __VERSION_H__
#ifndef DO_DEPS_ONLY
#include "version_autogenerated.h" #include "version_autogenerated.h"
#endif
#endif /* __VERSION_H__ */ #endif /* __VERSION_H__ */