From c0321d8d13c5ba11219c7db09f0ad3e3baf194f3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 10:55:03 -0400 Subject: remove forced dvb frontend module dependencies left around from old build method From: Michael Krufky Signed-off-by: Michael Krufky --- v4l/Makefile | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index c74019f45..864ae6732 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -18,11 +18,6 @@ default:: Makefile.media links .version ################################################# # CFLAGS configuration -# for DVB -EXTRA_CFLAGS += -DDVB_CVS=1 -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/ -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends/ - ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y) EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1 endif @@ -35,28 +30,6 @@ ifeq ($(CONFIG_DVB_FIRESAT),m) EXTRA_CFLAGS += -I$(srctree)/drivers/ieee1394/ endif -ifeq ($(CONFIG_VIDEO_CX88_DVB),m) - EXTRA_CFLAGS += -DCONFIG_VIDEO_CX88_DVB_MODULE=1 - EXTRA_CFLAGS += -DHAVE_CX22702=1 - EXTRA_CFLAGS += -DHAVE_OR51132=1 - EXTRA_CFLAGS += -DHAVE_LGDT330X=1 - EXTRA_CFLAGS += -DHAVE_MT352=1 - EXTRA_CFLAGS += -DHAVE_ZL10353=1 - EXTRA_CFLAGS += -DHAVE_NXT200X=1 - EXTRA_CFLAGS += -DHAVE_CX24123=1 - EXTRA_CFLAGS += -DHAVE_VP3054_I2C=1 -endif - -ifeq ($(CONFIG_VIDEO_SAA7134_DVB),m) - EXTRA_CFLAGS += -DHAVE_MT352=1 - EXTRA_CFLAGS += -DHAVE_TDA1004X=1 - EXTRA_CFLAGS += -DHAVE_NXT200X=1 -endif - -ifeq ($(CONFIG_VIDEO_BUF_DVB),m) - EXTRA_CFLAGS += -DHAVE_VIDEO_BUF_DVB=1 -endif - ifeq ($(CONFIG_DVB_AV7110_OSD),y) EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_OSD=1 endif -- cgit v1.2.3 From b3517807572461268b800009d1148d4e81e79ad9 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 11:23:00 -0400 Subject: remove redundant EXTRA_CFLAGS from local Makefile for pvrusb2 From: Michael Krufky The EXTRA_CFLAGS complile-time options for pvrusb2 are determined by kbuild, and are set in drivers/media/video/pvrusb2/[Makefile|Kconfig]. Setting these flags in the local Makefile is redundant. Signed-off-by: Michael Krufky --- v4l/Makefile | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 864ae6732..a96571f1c 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -38,17 +38,6 @@ ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y) EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_FIRMWARE_FILE endif -# for pvrusb2 -ifeq ($(CONFIG_VIDEO_PVRUSB2_SYSFS),y) - EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_SYSFS -endif -ifeq ($(CONFIG_VIDEO_PVRUSB2_DEBUGIFC),y) - EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_DEBUGIFC -endif -ifeq ($(CONFIG_VIDEO_PVRUSB2_24XXX),y) - EXTRA_CFLAGS += -DCONFIG_VIDEO_PVRUSB2_24XXX -endif - EXTRA_CFLAGS += -g EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL) -- cgit v1.2.3 From ad0f358703b8e45db5d9645b69503d2b99ae1e50 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 25 Apr 2006 11:32:05 -0400 Subject: remove redundant EXTRA_CFLAGS setting in Makefile for CONFIG_VIDEO_ADV_DEBUG From: Michael Krufky The EXTRA_CFLAGS complile-time options are determined by kbuild. CONFIG_VIDEO_ADV_DEBUG is set in drivers/media/video/[Makefile|Kconfig]. Setting this flag in the local Makefile is redundant. Signed-off-by: Michael Krufky --- v4l/Makefile | 4 ---- 1 file changed, 4 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index a96571f1c..4c11902b5 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -18,10 +18,6 @@ default:: Makefile.media links .version ################################################# # CFLAGS configuration -ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y) - EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1 -endif - ifeq ($(CONFIG_XC3028),m) EXTRA_CFLAGS += -DCONFIG_XC3028=1 endif -- cgit v1.2.3 From ecf096774ea92402d1ebea9d8fac8ac12316d766 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 10:13:07 -0300 Subject: Added some tests at build system to avoid rebuilding kernel stuff From: Mauro Carvalho Chehab Now, make will first check for the presense of *conf and lxconfig. if already found at kernel tree, it will use without recompiling. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index dc7836557..3afe20e8b 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -76,6 +76,7 @@ KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media ################################################# # Compiler fixup rules +HOSTCC:=$(CC) CC += -I$(obj) ifeq ($(VERSION).$(PATCHLEVEL),2.6) @@ -180,22 +181,28 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) -build := srctree=$(KDIR) HOSTCXX=$(CXX) HOSTCC=$(CC) CONFIG_SHELL=$(CONFIG_SHELL) -f $(KDIR)/scripts/Makefile.build obj +build := srctree=$(KDIR) HOSTCXX="$(CXX)" HOSTCC="$(HOSTCC)" CONFIG_SHELL="$(CONFIG_SHELL)" -f $(KDIR)/scripts/Makefile.build obj xconfig:: links .version - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf + -if [ ! -f $(KDIR)/scripts/kconfig/qconf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf; \ + fi ./scripts/make_kconfig.pl $(KDIR)/scripts/kconfig/qconf Kconfig ./scripts/make_noconfig.pl gconfig:: links .version - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf + -if [ ! -f $(KDIR)/scripts/kconfig/gconf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf; \ + fi ./scripts/make_kconfig.pl $(KDIR)/scripts/kconfig/gconf Kconfig ./scripts/make_noconfig.pl config:: links .version - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf + -if [ ! -f $(KDIR)/scripts/kconfig/conf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf; \ + fi ./scripts/make_kconfig.pl $(KDIR)/scripts/kconfig/conf Kconfig ./scripts/make_noconfig.pl @@ -204,15 +211,21 @@ menuconfig:: links .version ./scripts/make_kconfig.pl -rm scripts/lxdialog scripts/kconfig -if [ -d $(KDIR)/scripts/lxdialog ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \ + if [ ! -f $(KDIR)/scripts/lxdialog/lxdialog ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \ + fi; \ ln -s $(KDIR)/scripts/lxdialog scripts/lxdialog; \ fi -if [ -d $(KDIR)/scripts/kconfig ]; then \ if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \ + if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \ + fi; \ else \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ + if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ + fi; \ fi; \ ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \ fi -- cgit v1.2.3 From e1526ffa31150849a329a3974cceb151193a1364 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 15:35:10 -0300 Subject: Some improvements at Makefile From: Mauro Carvalho Chehab Included a INSTALL file make help shows the INSTALL file added make release to force compiling against a specified version Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 3afe20e8b..bf4aa56f2 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -120,12 +120,21 @@ all:: allmodconfig default Makefile.media:: scripts/make_makefile.pl -.version: +.version:: ifneq ($(KERNELRELEASE),) - echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version + @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version else - echo "No version yet." - uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + @echo "No version yet." + @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version +endif + +release:: +ifneq ($(VER),) + @echo "Forcing compiling to version $(VER)." + @echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version +else + @echo "No version specified. Using `uname -r`." + @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif links:: @@ -139,7 +148,7 @@ kernel-links makelinks:: ################################################# # Cardlist updating rule -card cardlist cardlists: +card cardlist cardlists:: scripts/cardlist ################################################# @@ -281,9 +290,6 @@ old-install:: rminstall ################################################# # Tree management rules -change changes changelog:: - make -C .. changelog - update:: make -C .. update @@ -293,6 +299,11 @@ commit cvscommit hgcommit:: push:: make -C .. push +################################################# +# Help +help:: + @cat ../INSTALL + ################################################# # build tarballs rules @@ -305,7 +316,7 @@ tardest ?= . snapdir := $(HOME)/snapshot snap := $(name) -snapshot snap tarball: update distclean +snapshot snap tarball:: update distclean echo $(thisdir) echo $(name) echo $(date) > .snapshot -- cgit v1.2.3 From 6c57a552152a8a96e51cf0d327d482e774f10eb7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 15:45:52 -0300 Subject: Cleaned an obsoleted rule From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index bf4aa56f2..289183f56 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -122,19 +122,19 @@ Makefile.media:: .version:: ifneq ($(KERNELRELEASE),) - @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version + echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version else - @echo "No version yet." - @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + echo "No version yet." + uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif release:: ifneq ($(VER),) - @echo "Forcing compiling to version $(VER)." - @echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + echo "Forcing compiling to version $(VER)." + -echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version else - @echo "No version specified. Using `uname -r`." - @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + echo "No version specified. Using `uname -r`." + -uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif links:: @@ -170,9 +170,6 @@ distclean:: clean ################################################# # Kernel module insert/removal rules -rmmodules:: - rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d) - insmod load:: scripts/insmod.sh load @@ -299,11 +296,6 @@ commit cvscommit hgcommit:: push:: make -C .. push -################################################# -# Help -help:: - @cat ../INSTALL - ################################################# # build tarballs rules -- cgit v1.2.3 From 0ec86f485a5553976721525a52d4b85642e6de1c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 26 Apr 2006 18:00:35 -0300 Subject: The latest patch partially reverted some changes. fixing it. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 289183f56..7814c6799 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -122,19 +122,19 @@ Makefile.media:: .version:: ifneq ($(KERNELRELEASE),) - echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version + @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version else - echo "No version yet." - uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + @echo "No version yet." + @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif release:: ifneq ($(VER),) - echo "Forcing compiling to version $(VER)." - -echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + @echo "Forcing compiling to version $(VER)." + @echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version else - echo "No version specified. Using `uname -r`." - -uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version + @echo "No version specified. Using `uname -r`." + @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif links:: @@ -296,6 +296,11 @@ commit cvscommit hgcommit:: push:: make -C .. push +################################################# +# Help +help:: + @cat ../INSTALL + ################################################# # build tarballs rules -- cgit v1.2.3 From 366fa98a817c19558aaa09755a2ce12931a35f3d Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 27 Apr 2006 09:30:20 -0400 Subject: move install / rminstall invocation rules to v4l/Makefile From: Michael Krufky This patch moves the 'make install' and 'make rminstall' rules into the central Makefile. This allows for us to assign dependencies to these rules, so that modules built as a reult of a tree-merge don't have to be installed separately. Now, instead of doing 'make install && make ivtv-install', the simple command, 'make install' will call the sub-install rules and take care of the entire task. Signed-off-by: Michael Krufky --- v4l/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 7814c6799..c57767940 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -114,6 +114,13 @@ export LC_ALL all:: allmodconfig default +################################################# +# installation invocation rules + +install:: media-install ivtv-install + +remove rminstall:: media-rminstall ivtv-rminstall + ################################################# # Compiling preparation rules -- cgit v1.2.3 From 1d85ad1382917c9c7823fc420a48e1f9052287e5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 17:31:16 -0300 Subject: Fix building when no .version is found From: Mauro Carvalho Chehab Makefile.media requires first .version. Fixed. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index c57767940..e786dee21 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -124,7 +124,7 @@ remove rminstall:: media-rminstall ivtv-rminstall ################################################# # Compiling preparation rules -Makefile.media:: +Makefile.media:: .version scripts/make_makefile.pl .version:: -- cgit v1.2.3 From 7381f005d9aca7e01befb8b00597396d03e337dd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 27 Apr 2006 19:01:14 -0300 Subject: Fixed a bug at make menuconfig From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index e786dee21..318d7f753 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -235,10 +235,9 @@ menuconfig:: links .version if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \ fi; \ - else \ - if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \ - $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ - fi; \ + fi; \ + if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \ + $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \ fi; \ ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \ fi -- cgit v1.2.3 From c460d095132c434e7c9b7e6c07ac34fef2c71557 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 28 Apr 2006 09:34:06 -0300 Subject: Improved make release method to allow compiling against an arbitrary dir From: Mauro Carvalho Chehab Now, with make DIR=, it is possible to compile V4L/DVB with a non-installed dir. This will allow better checking on compatibility issues (especially for -git tree) Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 55 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 318d7f753..58b160397 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -2,10 +2,31 @@ ifeq ($(obj),) obj = . endif +################################################# +# Version Check + +ifneq ($(KERNELRELEASE),) + +-include $(TOPDIR)/Rules.make + +else + +# take version info from last module build if available +-include $(obj)/.version + +ifneq ($(SRCDIR),) +KDIR := $(SRCDIR) +else +KDIR := /lib/modules/$(KERNELRELEASE)/build +endif + +endif + ################################################# # default compilation rule default:: Makefile.media links .version + echo srcdir $(SRCDIR) $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules ################################################# @@ -42,20 +63,18 @@ EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL) # Kernel 2.4/2.6 specific rules ifneq ($(KERNELRELEASE),) + ifeq ($(VERSION).$(PATCHLEVEL),2.6) export-objs := list-multi := else +include $(obj)/Makefile.kern24 + multi-m := $(filter $(list-multi), $(obj-m)) int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) export-objs := $(filter $(int-m) $(obj-m),$(export-objs)) endif -include $(obj)/Makefile.kern24 --include $(TOPDIR)/Rules.make -else -# take version info from last module build if available --include $(obj)/.version endif ################################################# @@ -67,11 +86,9 @@ SNAPSHOT_CFLAGS := -DSNAPSHOT='$(shell cat $(snapshot))' EXTRA_CFLAGS += $(SNAPSHOT_CFLAGS) endif -KDIR := /lib/modules/$(KERNELRELEASE)/build PWD := $(shell pwd) -DEST := /lib/modules/$(KERNELRELEASE)/$(MDIR) +DEST := /lib/modules/$(KERNELRELEASE)/v4l2 KDIR26 := /lib/modules/$(KERNELRELEASE)/kernel/drivers/media -KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media ################################################# # Compiler fixup rules @@ -130,6 +147,9 @@ Makefile.media:: .version .version:: ifneq ($(KERNELRELEASE),) @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version +ifneq ($(SRCDIR),) + @echo -e SRCDIR=$(SRCDIR)\\n >> $(obj)/.version +endif else @echo "No version yet." @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version @@ -139,10 +159,29 @@ release:: ifneq ($(VER),) @echo "Forcing compiling to version $(VER)." @echo $(VER)|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version +else +ifneq ($(DIR),) + @perl -e 'open IN,"<$(DIR)/Makefile"; \ + while () { \ + if (/^VERSION\s*=\s*([0-9]+)/){ $$version=$$1; next; }\ + if (/^PATCHLEVEL\s*=\s*([0-9]+)/){ $$level=$$1; next; }\ + if (/^SUBLEVEL\s*=\s*([0-9]+)/){ $$sublevel=$$1; next; }\ + if (/^EXTRAVERSION\s*=\s*([^\s]+)\n/){ $$extra=$$1; next; }\ + }; \ + 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 + @cat .version|grep KERNELRELEASE:|sed s,'KERNELRELEASE:=','Forcing compiling to version ', + + @if [ ! -f $(DIR)/scripts/kallsyms ]; then \ + echo "*** Warning: You should configure and build kernel before compiling V4L"; \ + fi + else @echo "No version specified. Using `uname -r`." @uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version endif +endif links:: @echo creating symbolic links... -- cgit v1.2.3