summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-29 23:36:14 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-08-29 23:36:14 +0200
commit4478dd69f2b9c27d2e6a4c9d6bbd4528483ec73c (patch)
treeb869e5cdf9516d737b09791ba1d96a4036316c70 /v4l/scripts
parent46280e1e8dab9fd0f9d10fbc5f7183c634328bd7 (diff)
downloadmediapointer-dvb-s2-4478dd69f2b9c27d2e6a4c9d6bbd4528483ec73c.tar.gz
mediapointer-dvb-s2-4478dd69f2b9c27d2e6a4c9d6bbd4528483ec73c.tar.bz2
v4l2-apps: fix v4l2-apps build and 'make firmware' warnings
From: Hans Verkuil <hverkuil@xs4all.nl> - fix some warnings when creating/removing directories when running 'make firmware' - fix v4l2-apps build: copy and strip the linux/include headers first to avoid the kernel-specific constructs in the original headers. Update the include paths to point to the copy. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/headers_convert.pl30
1 files changed, 30 insertions, 0 deletions
diff --git a/v4l/scripts/headers_convert.pl b/v4l/scripts/headers_convert.pl
new file mode 100644
index 000000000..800a453e1
--- /dev/null
+++ b/v4l/scripts/headers_convert.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+#
+# headers_install prepare the listed header files for use in
+# user space and copy the files to their destination.
+#
+
+use strict;
+use warnings;
+
+foreach (@ARGV) {
+ my $file = $_;
+ my $tmpfile = $file . ".tmp";
+
+ open(my $infile, '<', "$file")
+ or die "$file: $!\n";
+ open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n";
+ while (my $line = <$infile>) {
+ $line =~ s/([\s(])__user\s/$1/g;
+ $line =~ s/([\s(])__force\s/$1/g;
+ $line =~ s/([\s(])__iomem\s/$1/g;
+ $line =~ s/\s__attribute_const__\s/ /g;
+ $line =~ s/\s__attribute_const__$//g;
+ $line =~ s/^#include <linux\/compiler.h>//;
+ printf $outfile "%s", $line;
+ }
+ close $outfile;
+ close $infile;
+ system "mv $tmpfile $file";
+}
+exit 0;