summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2008-04-06 22:16:07 +0200
committerSam Ravnborg <sam@uranus.ravnborg.org>2008-04-28 22:40:14 +0200
commit5dffbe811b78684fc4d8538cb7b38d9c47f96f9f (patch)
tree5219a3c4a0bd5f91b66d6920b9f0ca33de3217cc /Makefile
parent79d6e539df8260fe5d12a2117494aaf80ca1b3e8 (diff)
downloadlinux-stable-5dffbe811b78684fc4d8538cb7b38d9c47f96f9f.tar.gz
linux-stable-5dffbe811b78684fc4d8538cb7b38d9c47f96f9f.tar.bz2
linux-stable-5dffbe811b78684fc4d8538cb7b38d9c47f96f9f.zip
kbuild: show defconfig subdirs in make help
PowerPC will start moving board defconfigs into subarch-specific subdirs soon. "make help" currently does not look in subdirs to find the defconfigs to show. This is partially a good thing, since there are way too many defconfigs for one list. This patch makes the main "make help" display something like help-40x - Show 40x-specific targets help-44x - Show 44x-specific targets help-boards - Show all of the above and wires up stuff so those new help-* commands actually work. [sam: fixed it up to display x86 defconfigs too] Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fc3411e6f071..da76f51990d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1174,8 +1174,10 @@ rpm: include/config/kernel.release FORCE
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
-boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
+boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
+board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
+board-dirs := $(sort $(notdir $(board-dirs:/=)))
help:
@echo 'Cleaning targets:'
@@ -1229,6 +1231,11 @@ help:
$(foreach b, $(boards), \
printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
echo '')
+ @$(if $(board-dirs), \
+ $(foreach b, $(board-dirs), \
+ printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \
+ printf " %-16s - Show all of the above\\n" help-boards; \
+ echo '')
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
@@ -1240,6 +1247,20 @@ help:
@echo 'For further info see the ./README file'
+help-board-dirs := $(addprefix help-,$(board-dirs))
+
+help-boards: $(help-board-dirs)
+
+boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig))
+
+$(help-board-dirs): help-%:
+ @echo 'Architecture specific targets ($(SRCARCH) $*):'
+ @$(if $(boards-per-dir), \
+ $(foreach b, $(boards-per-dir), \
+ printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \
+ echo '')
+
+
# Documentation targets
# ---------------------------------------------------------------------------
%docs: scripts_basic FORCE