summaryrefslogtreecommitdiff
path: root/v4l/Makefile
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-06-01 20:18:52 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-06-01 20:18:52 -0300
commit4e4c168746908b7dc88bb1fe46b7308164fb145c (patch)
treef69dfba3f28b1359e0bae7a238c7c4b1684c8878 /v4l/Makefile
parent8391e4a8e4148d94a9eaecf3fbd242d959ace901 (diff)
downloadmediapointer-dvb-s2-4e4c168746908b7dc88bb1fe46b7308164fb145c.tar.gz
mediapointer-dvb-s2-4e4c168746908b7dc88bb1fe46b7308164fb145c.tar.bz2
Reverting last changeset. There were two different patches merged together
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/Makefile')
-rw-r--r--v4l/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 954d5227e..ad499751d 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -238,8 +238,21 @@ links::
oss:
ln -sf . oss
-config-compat.h:: $(obj)/.version .myconfig
- perl scripts/make_config_compat.pl $(KDIR) $(obj)/.myconfig $(obj)/config-compat.h
+config-compat.h:: .myconfig
+ @perl \
+ -e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \
+ -e 'print "#define __CONFIG_COMPAT_H__\n\n";' \
+ -e 'print "#include <linux/autoconf.h>\n\n";' \
+ -e 'while(<>) {' \
+ -e ' next unless /^(\S+)\s*:= (\S+)$$/;' \
+ -e ' print "#undef $$1\n";' \
+ -e ' print "#undef $$1_MODULE\n";' \
+ -e ' if($$2 eq "n") { next; }' \
+ -e ' elsif($$2 eq "m") { print "#define $$1_MODULE 1\n"; }' \
+ -e ' elsif($$2 eq "y") { print "#define $$1 1\n"; }' \
+ -e ' else { print "#define $$1 $$2\n"; }' \
+ -e '} print "\n#endif\n";' \
+ < .myconfig > config-compat.h
kernel-links makelinks::
cd ..; v4l/scripts/makelinks.sh $(KDIR)