From 7bbcab1af264a64efd2772c7e078e2137a24e018 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 23 Jun 2006 13:26:14 -0300 Subject: Break make release into several lines keeping it work with make 3.81 From: Mauro Carvalho Chehab Also, fixes a trouble with make 3.81 introduced by the latest patch. make 3.81 doesn't work fine with something like: 'foo'\ It should be, instead: 'foo' \ Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'v4l') 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 () { 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 () {' \ + -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 \n\n";' \ - -e 'while(<>) {'\ + -e 'while(<>) {' \ -e ' next unless /^(\S+)\s*:= (\S+)$$/;' \ -e ' print "#undef $$1\n";' \ -e ' if($$2 eq "n") { next; }' \ -- cgit v1.2.3