From 2a3699c7aea27b7c2c464e29e0b75b4f433f2d5a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 1 Mar 2006 03:34:54 -0300 Subject: Added make qconfig option to allow testing v4l/dvb menus From: Mauro Carvalho Chehab - make qconfig option were added. - This will generate a menu with v4l/dvb Kconfig menus at the beginning of the menus and the kernel menus at the end. Kernel menus shoudn't be touched. - .config is then generated after quiting. - Curently, .config is not used by Makefile proccess but it is a good candidate to be a replacement of Make.config file. With a good .config file, compilation should be faster. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 v4l/scripts/make_kconfig.pl (limited to 'v4l/scripts/make_kconfig.pl') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl new file mode 100755 index 000000000..f612e83db --- /dev/null +++ b/v4l/scripts/make_kconfig.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl +use FileHandle; + +my $KDIR=shift; +my $ARCH=shift; + +sub open_kconfig($$) { + my ($dir,$file)=@_; + my $in = new FileHandle; + +print "opening $file\n"; + open $in,"$file"; + while (<$in>) { + if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) { + next; + } + if (m|^\s*source[\s\"]+([^\n\s\"]+)[\n\s\"]|) { + open_kconfig($dir,"$dir/$1"); + next; + } + s/^main(menu\s\"[^\"]+)/\1 - DON'T CHANGE IT!/; + print OUT $_; + } + close $in; +} + +open OUT,">Kconfig.kern"; +open_kconfig($KDIR,"$KDIR/arch/$ARCH/Kconfig"); +print OUT "endmenu\n"; +close OUT; + +open OUT,">Kconfig"; +print OUT "mainmenu \"V4L/DVB menu\"\n"; +open_kconfig ("../linux","../linux/drivers/media/video/Kconfig"); +open_kconfig ("../linux","../linux/drivers/media/dvb/Kconfig"); +print OUT "source Kconfig.kern\n"; +close OUT; -- cgit v1.2.3