summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index b162ddcc3..663369674 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -159,7 +159,17 @@ ifneq ($(VER),)
else
ifneq ($(DIR),)
@echo "Seeking for a version at $(DIR)/Makefile."
- @perl -e 'open IN,"$(DIR)/Makefile"; while (<IN>) { if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; } elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; } elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; } elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; } }; printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n", $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra); printf ("SRCDIR:=$(DIR)\n");' > $(obj)/.version
+ @perl \
+ -e 'open IN,"$(DIR)/Makefile"; ' \
+ -e 'while (<IN>) {' \
+ -e ' if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; }' \
+ -e ' elsif (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; }' \
+ -e ' elsif (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; }' \
+ -e ' elsif (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; }' \
+ -e '};' \
+ -e 'printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",' \
+ -e ' $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra);' \
+ -e 'printf ("SRCDIR:=$(DIR)\n");' > $(obj)/.version
@cat .version|grep KERNELRELEASE:|sed s,'KERNELRELEASE:=','Forcing compiling to version ',
@if [ ! -f $(DIR)/scripts/kallsyms ]; then \
@@ -181,7 +191,7 @@ config-compat.h:: .myconfig
-e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \
-e 'print "#define __CONFIG_COMPAT_H__\n\n";' \
-e 'print "#include <linux/config.h>\n\n";' \
- -e 'while(<>) {'\
+ -e 'while(<>) {' \
-e ' next unless /^(\S+)\s*:= (\S+)$$/;' \
-e ' print "#undef $$1\n";' \
-e ' if($$2 eq "n") { next; }' \