diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-07-04 17:58:23 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-07-04 17:58:23 +0200 |
commit | 8fbac88a9c801be025c283275f2eb6585a5cc454 (patch) | |
tree | bd82f6b1848d218e56f57805fdc569b9574e8089 /v4l/scripts/make_makefile.pl | |
parent | c0b0560a9ed6e97eca6da5f8432c0dbb2fe471ad (diff) | |
parent | 54b507ede0a1c5349b47f84af7d3d0b417467e3a (diff) | |
download | mediapointer-dvb-s2-8fbac88a9c801be025c283275f2eb6585a5cc454.tar.gz mediapointer-dvb-s2-8fbac88a9c801be025c283275f2eb6585a5cc454.tar.bz2 |
sync with master
From: Patrick Boettcher <pb@linuxtv.org>
sync with master
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'v4l/scripts/make_makefile.pl')
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 8371f6a4a..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,12 +110,13 @@ sub open_makefile($) { close $in; } -open OUT,">Makefile.media"; +open OUT,">Makefile.media.new"; open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule -printf OUT "install::\n"; -#printf OUT "\t@strip --strip-debug \$(inst-m)\n\n"; +printf OUT "media-install::\n"; +printf OUT "\t\@echo \"Stripping debug info from files:\"\n"; +printf OUT "\t\@strip --strip-debug \$(inst-m)\n\n"; while ( my ($key, $value) = each(%instdir) ) { printf OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$key files:\"\n"; @@ -127,7 +129,7 @@ while ( my ($key, $value) = each(%instdir) ) { printf OUT "\t/sbin/depmod -a \${KERNELRELEASE}\n\n"; # Creating Remove rule -printf OUT "remove rminstall::\n"; +printf OUT "media-rminstall::\n"; printf OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n"; while ( my ($key, $value) = each(%instdir) ) { @@ -155,10 +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 { - system "make allmodconfig"; + printf("Creating Makefile.media.\n"); + system "mv Makefile.media.new Makefile.media"; } - +if (open IN,".myconfig") { + close IN; +} else { + system "./scripts/make_kconfig.pl $kernel 1"; +} |