Re: make help ARCH=xx fun

From: Sam Ravnborg
Date: Wed Feb 25 2004 - 14:41:37 EST


>
> > I will try to come up with a patch the uses a file named
> > arch/$(ARCH)/configs/index.txt
>
> The 'issue' with configs/index.txt, I'll wager, is that for every new
> board, that's one more file to modify (and thus possibly conflict on).

What about the following patch.
This adds the support to the top-level Makefile, enabling this for all
_defconfig users.
I used 'printf' to get proper alignment. Otherwise arm for example
looked really ugly.
Is printf generally supported?

Sam



===== Makefile 1.456 vs edited =====
--- 1.456/Makefile Sun Feb 15 03:42:40 2004
+++ edited/Makefile Wed Feb 25 21:34:34 2004
@@ -889,6 +889,9 @@
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------

+boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
+boards := $(notdir $(boards))
+
help:
@echo 'Cleaning targets:'
@echo ' clean - remove most generated files but keep the config'
@@ -914,6 +917,11 @@
@$(if $(archhelp),$(archhelp),\
echo ' No architecture specific help defined for $(ARCH)')
@echo ''
+ @$(if $(boards), \
+ $(foreach b, $(boards), \
+ printf " %24s - Build for %s\\n" $(b) $(b);) \
+ echo '')
+
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check all c source with checker tool'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/