summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-01 03:34:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-01 03:34:54 -0300
commit2a3699c7aea27b7c2c464e29e0b75b4f433f2d5a (patch)
tree2eff17fa991d08440a66ccc8620996d333456463 /v4l
parent7e653c386bf40fb3287ce7fe2698c731d10daca9 (diff)
downloadmediapointer-dvb-s2-2a3699c7aea27b7c2c464e29e0b75b4f433f2d5a.tar.gz
mediapointer-dvb-s2-2a3699c7aea27b7c2c464e29e0b75b4f433f2d5a.tar.bz2
Added make qconfig option to allow testing v4l/dvb menus
From: Mauro Carvalho Chehab <mchehab@infradead.org> - 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 <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Makefile13
-rwxr-xr-xv4l/scripts/make_kconfig.pl37
2 files changed, 49 insertions, 1 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 1a34c6f24..07c33bc20 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -216,6 +216,11 @@ $(obj)/av7110_firm.h: $(obj)/fdump
EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_FIRMWARE_FILE
endif
+ifeq ($(ARCH),)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ )
+endif
#################################################
# compile modules
@@ -345,6 +350,10 @@ all:: default
default:: links .version
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
+qconfig:: links .version
+ ./scripts/make_kconfig.pl /usr/src/linux-2.6.14 $(ARCH)
+ $(KDIR)/scripts/kconfig/qconf Kconfig
+
pvrusb2::
@echo creating pvrusb2 symbolic links...
@find ../v4l_experimental/pvrusb2 -name '*.[ch]' -type f -exec ln -sf '{}' . \;
@@ -523,7 +532,9 @@ rmmodules::
clean::
@find . -name '*.c' -type l -exec rm '{}' \;
@find . -name '*.h' -type l -exec rm '{}' \;
- -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump ivtv-svnversion.h .pvrusb2-merge
+ -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \
+ ivtv-svnversion.h .pvrusb2-merge \
+ Kconfig Kconfig.kern .config .config.cmd
distclean:: clean
-rm -f .version .*.o.flags .*.o.d
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;