diff options
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 82821b43b..ac1b6cac0 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -157,6 +157,33 @@ sub removeobsolete() } } +# +# Special hack for Ubuntu with their backport mess +# +sub removeubuntu() +{ + my $dest = "/lib/modules/\$(KERNELRELEASE)/ubuntu/media"; + my $filelist; + + while ( my ($dir, $files) = each(%instdir) ) { + $filelist .= join(' ', keys %$files); + } + while ( my ($dir, $files) = each(%obsolete) ) { + $filelist .= join(' ', keys %$files); + } + $filelist =~ s/\s+$//; + + print OUT "\t\@if [ -d $dest ]; then "; + print OUT "printf \"\\nHmm... distro kernel with a non-standard place for module backports detected.\\n"; + print OUT "Please always prefer to use vanilla upstream kernel with V4L/DVB\\n"; + print OUT "I'll try to remove old/obsolete LUM files from $dest:\\n\"; "; + print OUT "files='", $filelist, "'; "; + + print OUT "for i in \$\$files;do find \"$dest\" \-name \"\$\$i\" \-exec echo \'{}\' \';\' ;"; + print OUT " find \"$dest\" \-name \"\$\$i\" \-exec rm \'{}\' \';\' ;"; + print OUT " done;"; + print OUT " fi\n"; +} getobsolete(); @@ -169,6 +196,7 @@ print OUT "\t\@echo \"Stripping debug info from files\"\n"; print OUT "\t\@strip --strip-debug \$(inst-m)\n\n"; removeobsolete(); +removeubuntu(); print OUT "\t\@echo \"Installing kernel modules under \$(DESTDIR)\$(KDIR26)/:\"\n"; @@ -191,8 +219,8 @@ print OUT "\t/sbin/depmod -a \$(KERNELRELEASE) \$(if \$(DESTDIR),-b \$(DESTDIR)) print OUT "media-rminstall::\n"; removeobsolete(); +removeubuntu(); -print OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n"; while ( my ($dir, $files) = each(%instdir) ) { print OUT "\t\@echo -e \"\\nRemoving old \$(KDIR26)/$dir files:\"\n"; print OUT "\t\@files='", join(' ', keys %$files), "'; "; |