diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2008-04-06 16:16:07 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@uranus.ravnborg.org> | 2008-04-28 16:40:14 -0400 |
commit | 5dffbe811b78684fc4d8538cb7b38d9c47f96f9f (patch) | |
tree | 5219a3c4a0bd5f91b66d6920b9f0ca33de3217cc /Makefile | |
parent | 79d6e539df8260fe5d12a2117494aaf80ca1b3e8 (diff) |
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-- | Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -1174,8 +1174,10 @@ rpm: include/config/kernel.release FORCE | |||
1174 | # Brief documentation of the typical targets used | 1174 | # Brief documentation of the typical targets used |
1175 | # --------------------------------------------------------------------------- | 1175 | # --------------------------------------------------------------------------- |
1176 | 1176 | ||
1177 | boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) | 1177 | boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig) |
1178 | boards := $(notdir $(boards)) | 1178 | boards := $(notdir $(boards)) |
1179 | board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig)) | ||
1180 | board-dirs := $(sort $(notdir $(board-dirs:/=))) | ||
1179 | 1181 | ||
1180 | help: | 1182 | help: |
1181 | @echo 'Cleaning targets:' | 1183 | @echo 'Cleaning targets:' |
@@ -1229,6 +1231,11 @@ help: | |||
1229 | $(foreach b, $(boards), \ | 1231 | $(foreach b, $(boards), \ |
1230 | printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ | 1232 | printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ |
1231 | echo '') | 1233 | echo '') |
1234 | @$(if $(board-dirs), \ | ||
1235 | $(foreach b, $(board-dirs), \ | ||
1236 | printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \ | ||
1237 | printf " %-16s - Show all of the above\\n" help-boards; \ | ||
1238 | echo '') | ||
1232 | 1239 | ||
1233 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' | 1240 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' |
1234 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' | 1241 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' |
@@ -1240,6 +1247,20 @@ help: | |||
1240 | @echo 'For further info see the ./README file' | 1247 | @echo 'For further info see the ./README file' |
1241 | 1248 | ||
1242 | 1249 | ||
1250 | help-board-dirs := $(addprefix help-,$(board-dirs)) | ||
1251 | |||
1252 | help-boards: $(help-board-dirs) | ||
1253 | |||
1254 | boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)) | ||
1255 | |||
1256 | $(help-board-dirs): help-%: | ||
1257 | @echo 'Architecture specific targets ($(SRCARCH) $*):' | ||
1258 | @$(if $(boards-per-dir), \ | ||
1259 | $(foreach b, $(boards-per-dir), \ | ||
1260 | printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \ | ||
1261 | echo '') | ||
1262 | |||
1263 | |||
1243 | # Documentation targets | 1264 | # Documentation targets |
1244 | # --------------------------------------------------------------------------- | 1265 | # --------------------------------------------------------------------------- |
1245 | %docs: scripts_basic FORCE | 1266 | %docs: scripts_basic FORCE |