summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/make_config_compat.pl20
-rwxr-xr-xv4l/scripts/make_makefile.pl30
2 files changed, 49 insertions, 1 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index e538c925b..bd34e7193 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -83,12 +83,32 @@ sub check_snd_ctl_boolean_mono_info()
close INNET;
}
+sub check_bool()
+{
+ my $file = "$kdir/include/linux/types.h";
+ my $old_syntax = 1;
+
+ open INDEP, "<$file" or die "File not found: $file";
+ while (<INDEP>) {
+ if (m/^\s*typedef.*bool;/) {
+ $old_syntax = 0;
+ last;
+ }
+ }
+
+ if ($old_syntax) {
+ $out.= "\n#define NEED_BOOL_TYPE 1\n";
+ }
+ close INDEP;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
check_sound_driver_h();
check_snd_ctl_boolean_mono_info();
check_snd_pcm_rate_to_rate_bit();
+ check_bool();
}
# Do the basic rules
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), "'; ";