diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-10-25 10:07:57 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-10-25 10:07:57 +0200 |
commit | 6b2362e63b011d40167d2ec6365668c2966643e9 (patch) | |
tree | b86173981b8298c08dc9afd6b24a9cb66ac95e81 /v4l/scripts/make_makefile.pl | |
parent | 9487678147d617a72de2c003e5b9861235c9c0fb (diff) | |
parent | f46b85426d01f8ce77fd9a4a036cc0345ae1c4be (diff) | |
download | mediapointer-dvb-s2-6b2362e63b011d40167d2ec6365668c2966643e9.tar.gz mediapointer-dvb-s2-6b2362e63b011d40167d2ec6365668c2966643e9.tar.bz2 |
merge: v4l-dvb
Diffstat (limited to 'v4l/scripts/make_makefile.pl')
-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..ce6f00516 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 non-standard dir +# +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), "'; "; |