From a65cbc3b7aa2eaf072f20f362966f0b0055077b3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 20 Jun 2006 20:01:22 -0300 Subject: Adjust distclean target to clean a few more files From: Trent Piepho distclean was not cleaning the v4l/.myconfig file, or the symlinks made for the lxdialog program. This caused problems especially if you were switching between different kernel versions for testing. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index d20e68d4e..5be5f40ba 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -216,8 +216,9 @@ clean:: distclean:: clean -rm -f .version .*.o.flags .*.o.d Makefile.media \ - Kconfig Kconfig.kern .config .config.cmd + Kconfig Kconfig.kern .config .config.cmd .myconfig -rm -rf .tmp_versions + -rm -f scripts/lxdialog scripts/kconfig @find .. -name '*.orig' -exec rm '{}' \; @find .. -name '*.rej' -exec rm '{}' \; -- cgit v1.2.3 From 74e1ed0781b35cfd53baba71c84dfbf6c59c5403 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 10:04:08 -0300 Subject: Fixes circular dependencies at building system From: Mauro Carvalho Chehab There were a circular dependency at scripts/make_makefile.pl that were affecting mostly building with GNU make 3.81. Also, scripts/make_noconfig.pl is, in fact, building .myconfig file, so, better to name it as make_myconfig.pl. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index d20e68d4e..27a79a181 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -180,7 +180,9 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; -config-compat.h:: .myconfig +config-compat.h:: + scripts/make_myconfig.pl + @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h @echo >> config-compat.h @@ -253,26 +255,26 @@ LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog xconfig:: links .version $(QCONF) ./scripts/make_kconfig.pl $(QCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl gconfig:: links .version $(GCONF) ./scripts/make_kconfig.pl $(QCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl config:: links .version $(CONF) ./scripts/make_kconfig.pl $(CONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl menuconfig:: links .version $(MCONF) lxdialog ./scripts/make_kconfig.pl $(MCONF) Kconfig - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl allyesconfig allmodconfig:: links .version ./scripts/make_kconfig.pl 1 - ./scripts/make_noconfig.pl + ./scripts/make_myconfig.pl # rule to build kernel conf programs KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0 -- cgit v1.2.3 From 6cfc8eeff6261fb1153a67e5bc3c71616f332044 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 12:23:13 -0300 Subject: Some improvements at the building system From: Mauro Carvalho Chehab Building system now looks kernel config.h and autoconf.h files, seeking for the compiled options at kernel. If something is missing, it will disable compilation for that driver, printing a warning message. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 58354a035..881329d7d 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -17,7 +17,12 @@ else ifneq ($(SRCDIR),) KDIR := $(SRCDIR) else +ifneq ($(KERNELRELEASE),) KDIR := /lib/modules/$(KERNELRELEASE)/build +else +KDIR := /lib/modules/$(shell uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("%s.%s.%s%s\n",$$1,$$2,$$3,$$4); };')/build + +endif endif endif @@ -133,9 +138,6 @@ remove rminstall:: media-rminstall ivtv-rminstall ################################################# # Compiling preparation rules -Makefile.media:: .version - scripts/make_makefile.pl - .version:: ifneq ($(KERNELRELEASE),) @echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version @@ -147,6 +149,9 @@ else @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 +Makefile.media:: .version + scripts/make_makefile.pl $(KDIR) + release:: ifneq ($(VER),) @echo "Forcing compiling to version $(VER)." @@ -180,9 +185,7 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; -config-compat.h:: - scripts/make_myconfig.pl - +config-compat.h:: .myconfig @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h @echo >> config-compat.h @@ -253,29 +256,27 @@ LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kc LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog +.myconfig : .config + ./scripts/make_myconfig.pl + xconfig:: links .version $(QCONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(QCONF) Kconfig - ./scripts/make_myconfig.pl gconfig:: links .version $(GCONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(QCONF) Kconfig - ./scripts/make_myconfig.pl config:: links .version $(CONF) - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(CONF) Kconfig - ./scripts/make_myconfig.pl menuconfig:: links .version $(MCONF) lxdialog - ./scripts/make_kconfig.pl + ./scripts/make_kconfig.pl $(KDIR) $(MCONF) Kconfig - ./scripts/make_myconfig.pl allyesconfig allmodconfig:: links .version - ./scripts/make_kconfig.pl 1 - ./scripts/make_myconfig.pl + ./scripts/make_kconfig.pl $(KDIR) 1 # rule to build kernel conf programs KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0 -- cgit v1.2.3