From 727ebd9fd9c607b14d35726062a7ded7190691b5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 11 Aug 2010 18:52:36 -0400 Subject: Makefile: restore support for board shortcut targets 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 Acked-by: Detlev Zundel --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c15897cf20..f06d751eb1 100644 --- 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 -- cgit v1.2.1 From 0358df427ff701b042b87ccce0e97cc7930d1cb4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 15 Aug 2010 00:03:21 -0400 Subject: unify toplevel tools targets Most tool subdirs do not rely on a configured tree, so move those targets out of the config checks and unify them in the process. Also add an easylogo target so people can easily build that. Also add these new tool targets to the 'tools-all' target. Signed-off-by: Mike Frysinger --- Makefile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f06d751eb1..84947d0f96 100644 --- a/Makefile +++ b/Makefile @@ -404,14 +404,8 @@ $(TIMESTAMP_FILE): @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@ -gdbtools: - $(MAKE) -C tools/gdb all || exit 1 - updater: - $(MAKE) -C tools/updater all || exit 1 - -env: - $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 + $(MAKE) -C tools/updater all # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. @@ -466,17 +460,22 @@ $(obj)include/autoconf.mk: $(obj)include/config.h else # !config.mk all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ -$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools \ -updater env depend dep tags ctags etags cscope $(obj)System.map: +$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) \ +updater depend dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1 tools: - $(MAKE) -C tools -tools-all: - $(MAKE) -C tools HOST_TOOLS_ALL=y + $(MAKE) -C $@ all endif # config.mk +easylogo env gdb: + $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} +gdbtools: gdb + +tools-all: easylogo env gdb + $(MAKE) -C tools HOST_TOOLS_ALL=y + .PHONY : CHANGELOG CHANGELOG: git log --no-merges U-Boot-1_1_5.. | \ -- cgit v1.2.1