From: Peter Tyser Date: Fri, 13 Mar 2009 23:54:25 +0000 (-0500) Subject: Makefile: Make autoconf.mk a dependency of the depend target X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d0d6144e0e4a03a68311b781f3dde38dc9316b82;p=project%2Fbcm63xx%2Fu-boot.git Makefile: Make autoconf.mk a dependency of the depend target The original code did not generate autoconf.mk until after some targets dependencies had already been calculated, for example the directories in the SUBDIRS variable Signed-off-by: Peter Tyser --- diff --git a/Makefile b/Makefile index 724d66ddb7..7ae31091c4 100644 --- a/Makefile +++ b/Makefile @@ -348,31 +348,31 @@ $(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot -$(OBJS): depend $(obj)include/autoconf.mk +$(OBJS): depend $(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@)) -$(LIBS): depend $(obj)include/autoconf.mk $(SUBDIRS) +$(LIBS): depend $(SUBDIRS) $(MAKE) -C $(dir $(subst $(obj),,$@)) -$(LIBBOARD): depend $(LIBS) $(obj)include/autoconf.mk +$(LIBBOARD): depend $(LIBS) $(MAKE) -C $(dir $(subst $(obj),,$@)) -$(SUBDIRS): depend $(obj)include/autoconf.mk +$(SUBDIRS): depend $(MAKE) -C $@ all -$(LDSCRIPT): depend $(obj)include/autoconf.mk +$(LDSCRIPT): depend $(MAKE) -C $(dir $@) $(notdir $@) $(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(MAKE) -C nand_spl/board/$(BOARDDIR) all -$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk +$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin $(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all -$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk +$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin @@ -394,7 +394,7 @@ updater: env: $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 -depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) +depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done TAG_SUBDIRS += include