diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-23 13:57:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-23 13:57:52 -0300 |
commit | 27db32c1fbbd03a1427f7b783dcc7eee372c953e (patch) | |
tree | 15019ebf9583a5bac96b03f0d3b2be7507363872 /v4l/scripts/make_makefile.pl | |
parent | 81d3af21e291c984f3e302fe4b142eb066ad5e44 (diff) | |
parent | 515941d047746d1026ffe99a794edd9ffea7a4d1 (diff) | |
download | mediapointer-dvb-s2-27db32c1fbbd03a1427f7b783dcc7eee372c953e.tar.gz mediapointer-dvb-s2-27db32c1fbbd03a1427f7b783dcc7eee372c953e.tar.bz2 |
merge: http://www.linuxtv.org/hg/~manu/v4l-algo
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/make_makefile.pl')
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 238c5082f..e0a099e9b 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use FileHandle; +my $kernel=shift; my $instdir = (); sub check_line($$$) @@ -109,7 +110,7 @@ sub open_makefile($) { close $in; } -open OUT,">Makefile.media"; +open OUT,">Makefile.media.new"; open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule @@ -156,8 +157,30 @@ while ( my ($key, $value) = each(%depend) ) { } close OUT; -if (open OUT,".myconfig") { +if (open IN,"Makefile.media") { + close IN; + my $changed=0; + if (open IN,"diff Makefile.media Makefile.media.new|") { + while (<IN>) { + if ($_ ne "") { + $changed=1; + } + } + close IN; + if ($changed) { + printf("One or more linux Makefiles had changed. Makefile.media rewrited.\n"); + system ("mv Makefile.media.new Makefile.media"); + } else { + system ("rm Makefile.media.new"); + } + } +} else { + printf("Creating Makefile.media.\n"); + system "mv Makefile.media.new Makefile.media"; +} + +if (open IN,".myconfig") { close IN; } else { - system "make allmodconfig"; + system "./scripts/make_kconfig.pl $kernel 1"; } |