X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=bfd4132c1527d35a5f66cf27c5be183d0fc43738;hb=88fed9a120aabd6e0b684e2616cafca58aaa7f93;hp=37b8db6945d75b21de0cbbbad4238f21ed6c1b81;hpb=3deca9d44767efd1b83f4b701f0dbf21a7595f7b;p=u-boot diff --git a/Makefile b/Makefile index 37b8db6945..bfd4132c15 100644 --- a/Makefile +++ b/Makefile @@ -364,17 +364,32 @@ TAG_SUBDIRS += drivers/video tags ctags: ctags -w -o $(OBJTREE)/ctags `find $(SUBDIRS) $(TAG_SUBDIRS) \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` + -name '*.[ch]' -print` etags: etags -a -o $(OBJTREE)/etags `find $(SUBDIRS) $(TAG_SUBDIRS) \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` + -name '*.[ch]' -print` $(obj)System.map: $(obj)u-boot @$(NM) $< | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(obj)System.map +# +# Auto-generate the autoconf.mk file (which is included by all makefiles) +# +# 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. +$(OBJTREE)/include/autoconf.mk: $(obj)include/config.h + @echo Generating include/autoconf.mk + @# Generate the dependancies + @$(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep + @# Extract the config macros + @$(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed >> $@ + +sinclude $(OBJTREE)/include/autoconf.mk.dep + ######################################################################### else all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ @@ -394,7 +409,8 @@ CHANGELOG: unconfig: @rm -f $(obj)include/config.h $(obj)include/config.mk \ - $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp + $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ + $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep #======================================================================== # PowerPC