]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Makefile: restore support for board shortcut targets
authorMike Frysinger <vapier@gentoo.org>
Wed, 11 Aug 2010 22:52:36 +0000 (18:52 -0400)
committerWolfgang Denk <wd@denx.de>
Sun, 19 Sep 2010 17:29:48 +0000 (19:29 +0200)
The helpful shortcut for doing a board config + make was dropped recently
as it conflicted with some new build code.  However, the reason for using
pattern targets originally was to avoid managing a duplicate list of
boards.  Since we now have one centralized place for a list of boards (the
new boards.cfg), we don't need a pattern target -- we can generate the
exact list of boards on the fly.  So do just that.

When cleaning things up, the top level gitignore file ignores all things
that end with ".depend", but the clean target only deletes files that are
named exactly ".depend".  Keep these in sync by having the clean target
punt all files that match the pattern that gitignore is using.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Detlev Zundel <dzu@denx.de>
Makefile

index c15897cf201ad951a126e3901688b8a2d532fb5b..f06d751eb12075330db41b00f9db45bf701cc3e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -494,8 +494,9 @@ unconfig:
 %_config::     unconfig
        @$(MKCONFIG) -A $(@:_config=)
 
-##%: %_config
-##     $(MAKE)
+sinclude .boards.depend
+.boards.depend:        boards.cfg
+       awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
 
 #
 # Functions to generate common board directory names
@@ -2475,7 +2476,7 @@ clean:
                | xargs rm -f
 
 clobber:       clean
-       @find $(OBJTREE) -type f \( -name .depend \
+       @find $(OBJTREE) -type f \( -name '*.depend' \
                -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
                -print0 \
                | xargs -0 rm -f