[PATCH 2.5][RFC] Make mconf inform user about supported make targets

From: Erlend Aasland (erlend-a@ux.his.no)
Date: Tue Mar 04 2003 - 06:30:54 EST


Scenario: I do a make menuconfig on my sparc64 machine. When mconf exits, it
tells me "Next, you may run 'make bzImage', 'make bzdisk', or 'make install'."

Problem: These are i386-specific targets. Issuing a "make help", I see
that {vmlinux{,.aout},tftpboot.img} are the sparc64-specific targets.

Solution: Get mconf to tell the user about arch-specific targets,
instead of i386 targets.

So, here is a trivial patch that change scripts/kconfig/Makefile and
scripts/kconfig/mconf.c. Small changes are also needed in most of the
arch/*/Makefiles. I've attached patches for all arch's that define
archhelp.

(I'm not shure if this is the easiest way to accomplish this, but
I've tested it (on sparc64) and it seems to work ok)

Patches are against 2.5.63.

Erlend Aasland

diff -urN linux-2.5.63/scripts/kconfig/Makefile linux-2.5.63-conf/scripts/kconfig/Makefile
--- linux-2.5.63/scripts/kconfig/Makefile Mon Feb 17 22:57:19 2003
+++ linux-2.5.63-conf/scripts/kconfig/Makefile Fri Feb 21 15:35:26 2003
@@ -19,7 +19,7 @@
 qconf-cxxobjs := qconf.o
 
 clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
- zconf.tab.c zconf.tab.h lex.zconf.c
+ zconf.tab.c zconf.tab.h lex.zconf.c arch.h
 
 # generated files seem to need this to find local include files
 HOSTCFLAGS_lex.zconf.o := -I$(src)
@@ -28,6 +28,8 @@
 HOSTLOADLIBES_qconf = -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) -ldl
 HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include
 
+$(obj)/mconf.o: $(src)/arch.h
+
 $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h
 
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
@@ -91,3 +93,24 @@
         flex -P$(notdir $*) -o$@ $<
 
 endif
+
+include arch/$(ARCH)/Makefile
+
+ifndef generate_kconfig_arch.h
+define generate_kconfig_arch.h
+ (echo "#ifndef ARCH_H"; \
+ echo "#define ARCH_H"; \
+ echo ""; \
+ echo "/*"; \
+ echo " * This file was automatically generated"; \
+ echo " *"; \
+ echo ""; \
+ echo 'static const char arch_maketargets[] = "";'; \
+ echo '";'; \
+ echo ""; \
+ echo "#endif";
+endef
+endif
+
+$(src)/arch.h:
+ @$(generate_kconfig_arch.h) > $(src)/arch.h
diff -urN linux-2.5.63/scripts/kconfig/mconf.c linux-2.5.63-conf/scripts/kconfig/mconf.c
--- linux-2.5.63/scripts/kconfig/mconf.c Mon Feb 17 22:56:02 2003
+++ linux-2.5.63-conf/scripts/kconfig/mconf.c Fri Feb 21 15:35:26 2003
@@ -19,6 +19,7 @@
 #include <termios.h>
 #include <unistd.h>
 
+#include "arch.h"
 #define LKC_DIRECT_LINK
 #include "lkc.h"
 
@@ -772,7 +773,7 @@
                 printf("\n\n"
                         "*** End of Linux kernel configuration.\n"
                         "*** Check the top-level Makefile for additional configuration.\n"
- "*** Next, you may run 'make bzImage', 'make bzdisk', or 'make install'.\n\n");
+ "*** Next, you may run %s 'make modules', 'make vmlinux' or 'make all'.\n\n", arch_maketargets);
         } else
                 printf("\n\nYour kernel configuration changes were NOT saved.\n\n");
 















-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:24 EST