r96 - unstable/rt2x00/debian

benh at alioth.debian.org benh at alioth.debian.org
Sun Nov 18 23:45:22 UTC 2007


Author: benh
Date: 2007-11-18 23:45:22 +0000 (Sun, 18 Nov 2007)
New Revision: 96

Modified:
   unstable/rt2x00/debian/changelog
   unstable/rt2x00/debian/rules
Log:
Disabled building drivers that are already included in the kernel (eeprom_93cx6 from 2.6.23; all modules from 2.6.24-rc1).


Modified: unstable/rt2x00/debian/changelog
===================================================================
--- unstable/rt2x00/debian/changelog	2007-11-17 16:59:49 UTC (rev 95)
+++ unstable/rt2x00/debian/changelog	2007-11-18 23:45:22 UTC (rev 96)
@@ -1,3 +1,10 @@
+rt2x00 (2.0.12+git20071103-2) unstable; urgency=low
+
+  * Disabled building drivers that are already included in the kernel
+    (eeprom_93cx6 from 2.6.23; all modules from 2.6.24-rc1)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Sun, 18 Nov 2007 19:43:49 +0000
+
 rt2x00 (2.0.12+git20071103-1) unstable; urgency=low
 
   * New version from git

Modified: unstable/rt2x00/debian/rules
===================================================================
--- unstable/rt2x00/debian/rules	2007-11-17 16:59:49 UTC (rev 95)
+++ unstable/rt2x00/debian/rules	2007-11-18 23:45:22 UTC (rev 96)
@@ -108,28 +108,39 @@
 .PHONY: kdist_config
 kdist_config: prep-deb-files
 
+# Detect whether rt2x00 and eeprom_93cx6 exist and are enabled in-tree.
+# Report an error if rt2x00 drivers exist in-tree or if eeprom_93cx6 is
+# in-tree but disabled.
+# We check the targets first, because this doesn't apply to builds of
+# the rt2x00-source package.
+ifneq ($(filter binary-modules binary_modules,$(MAKECMDGOALS)),)
+CONFIG_RT2X00:=$(shell sed -r 's/^(\# )?CONFIG_RT2X00(=([my])| is (n)ot set)/\\3\\4/; t; d' $(KSRC)/.config)
+ifneq ($(CONFIG_RT2X00),)
+ifeq ($(CONFIG_RT2X00),n)
+$(error The rt2x00 drivers are included in the kernel $(KVERS) source and should be enabled and built through the kernel configuration system)
+else
+$(error The rt2x00 drivers are included in the kernel $(KVERS) and do not need to be built separately)
+endif
+endif
+CONFIG_EEPROM_93CX6:=$(shell sed -r 's/^(\# )?CONFIG_EEPROM_93CX6(=([my])| is (n)ot set)/\\3\\4/; t; d' $(KSRC)/.config)
+ifeq ($(CONFIG_EEPROM_93CX6),n)
+$(error The rt2x00 drivers require the eeprom_93cx6 driver, which is included in the kernel $(KVERS) source but is not enabled.  You should first enable and build it through the kernel configuration system)
+endif
+endif
+
 .PHONY: binary_modules binary-modules
 binary-modules: binary_modules
-binary_modules: kdist_config
+binary_modules: kdist_config $(if $(CONFIG_EEPROM_93CX6),,eeprom_93cx6)
+	dh_testdir
+	dh_testroot
 
-	# Install module
-	dh_installdirs lib/modules/$(KVERS)/kernel/drivers/net/wireless
-
-	# Build modules
-	$(MAKE) -C drivers/misc
-	cat drivers/misc/Module.symvers >> drivers/net/wireless/rt2x00/Module.symvers
+	$(if $(CONFIG_EEPROM_93CX6),,cp drivers/misc/Module.symvers drivers/net/wireless/rt2x00/Module.symvers)
 	$(MAKE) -C drivers/net/wireless/rt2x00
 	mkdir -p debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net/wireless
 	for i in drivers/net/wireless/rt2x00/*.ko ; do \
-		install -m 0644 $$i debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net/wireless ; \
+		install -m 0644 $$i debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net/wireless || exit 1; \
 	done
-	mkdir -p debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/misc
-	for i in drivers/misc/*.ko ; do \
-		install -m 0644 $$i debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/misc ; \
-	done
 
-	dh_testdir
-	dh_testroot
 	dh_installdocs 
 	dh_installmodules
 	dh_installchangelogs
@@ -142,6 +153,15 @@
 	dh_md5sums
 	dh_builddeb --destdir=$(DEB_DESTDIR)
 
+.PHONY: eeprom_93cx6
+eeprom_93cx6:
+	dh_testdir
+	dh_testroot
+
+	$(MAKE) -C drivers/misc
+	mkdir -p debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/misc
+	install -m 0644 drivers/misc/eeprom_93cx6.ko debian/rt2x00-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/misc
+
 .PHONY: kdist_clean
 kdist_clean:
 	$(MAKE) -C drivers/net/wireless/rt2x00 clean




More information about the Pkg-ralink-commits mailing list