From a9ff6140f8e92cc2bf177238abadec338e4ed6a2 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 31 Jul 2005 20:58:53 +0000 Subject: - Better method for Makefile to detect compilation against -mm tree. Thanks to Sam Ravnborg Signed-off-by: Michael Krufky --- v4l/ChangeLog | 8 +++++++- v4l/Makefile | 10 ++-------- v4l/scripts/merge-trees.sh | 4 ++-- v4l/scripts/unmerge-trees.sh | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 1af6cd089..f56ea143b 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,5 +1,11 @@ -2005-07-31 12:07 mchehab +2005-07-31 20:40 mkrufky + * Makefile, scripts/merge-trees.sh, scripts/unmerge-trees.sh: + - Better method for Makefile to detect compilation against -mm tree. + Thanks to Sam Ravnborg + Signed-off-by: Michael Krufky + +2005-07-31 12:07 mchehab * tea5767.c: - removed #if 1 from newer tea autodetection code. diff --git a/v4l/Makefile b/v4l/Makefile index 93968dbe0..06d390e6c 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -87,20 +87,14 @@ endif CC += -I$(obj) EXTRA_CFLAGS += -g +EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL) + snapshot := $(wildcard $(obj)/.snapshot) ifneq ($(snapshot),) SNAPSHOT_CFLAGS := -DSNAPSHOT='$(shell cat $(snapshot))' EXTRA_CFLAGS += $(SNAPSHOT_CFLAGS) endif -mm-kernel := $(TOPDIR)/.mm -ifneq ($(mm-kernel),) -MM_KERNEL_CFLAGS := -DMM_KERNEL=$(shell cat $(mm-kernel) 2> /dev/null) -ifneq ($(MM_KERNEL_CFLAGS),-DMM_KERNEL=) -EXTRA_CFLAGS += $(MM_KERNEL_CFLAGS) -endif -endif - bttv.o: $(bttv-objs) $(LD) -r -o $@ $(bttv-objs) diff --git a/v4l/scripts/merge-trees.sh b/v4l/scripts/merge-trees.sh index d5be8ae23..2d16a39ab 100644 --- a/v4l/scripts/merge-trees.sh +++ b/v4l/scripts/merge-trees.sh @@ -38,7 +38,7 @@ diff -upr video4linux.orig/Makefile video4linux/Makefile EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/ EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends/ ifeq ($(CONFIG_VIDEO_CX88_DVB),m) -@@ -131,6 +132,7 @@ ifeq ($(inst-m),) +@@ -125,6 +126,7 @@ ifeq ($(inst-m),) endif inst_common := ir-common.ko @@ -46,7 +46,7 @@ diff -upr video4linux.orig/Makefile video4linux/Makefile inst_video := btcx-risc.ko bttv.ko tda9887.ko tuner.ko tvaudio.ko tveeprom.ko inst_video += tvmixer.ko v4l1-compat.ko v4l2-common.ko inst_video += video-buf.ko video-buf-dvb.ko -@@ -157,6 +159,9 @@ install:: rminstall +@@ -151,6 +153,9 @@ install:: rminstall -install -d $(KDIR26)/common -install -m 644 -c $(inst_common) $(KDIR26)/common diff --git a/v4l/scripts/unmerge-trees.sh b/v4l/scripts/unmerge-trees.sh index 82ec3b04f..a3224d794 100644 --- a/v4l/scripts/unmerge-trees.sh +++ b/v4l/scripts/unmerge-trees.sh @@ -38,7 +38,7 @@ diff -upr video4linux/Makefile video4linux.orig/Makefile EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/ EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends/ ifeq ($(CONFIG_VIDEO_CX88_DVB),m) -@@ -132,7 +131,6 @@ ifeq ($(inst-m),) +@@ -126,7 +125,6 @@ ifeq ($(inst-m),) endif inst_common := ir-common.ko @@ -46,7 +46,7 @@ diff -upr video4linux/Makefile video4linux.orig/Makefile inst_video := btcx-risc.ko bttv.ko tda9887.ko tuner.ko tvaudio.ko tveeprom.ko inst_video += tvmixer.ko v4l1-compat.ko v4l2-common.ko inst_video += video-buf.ko video-buf-dvb.ko -@@ -159,9 +157,6 @@ install:: rminstall +@@ -153,9 +151,6 @@ install:: rminstall -install -d $(KDIR26)/common -install -m 644 -c $(inst_common) $(KDIR26)/common -- cgit v1.2.3