From 5d307369c26107fe808c18117f13bbe2b5fb3a46 Mon Sep 17 00:00:00 2001
From: Florian Pose <fp@igh-essen.com>
Date: Wed, 8 Aug 2007 10:31:54 +0000
Subject: [PATCH] Fixed defines bug in configure; renamed config.kbuild
 variables.

---
 configure.ac         | 24 ++++++++++++------------
 devices/Kbuild       | 14 +++++++-------
 devices/e1000/Kbuild | 12 ++++++------
 dummy/Kbuild         |  2 +-
 examples/msr/Kbuild  |  2 +-
 examples/rtai/Kbuild |  2 +-
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/configure.ac b/configure.ac
index 41e4a928..236e442a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -397,18 +397,18 @@ echo configure: creating config.kbuild...
 
 cat > config.kbuild <<EOF
 # config.kbuild - created by configure
-EC_DEBUG_IF := ${dbg}
-EC_ENABLE_8139TOO := ${enable8139too}
-EC_8139TOO_KERNEL := ${kernel8139too}
-EC_ENABLE_E100 := ${enablee100}
-EC_E100_KERNEL := ${kernele100}
-EC_ENABLE_FORCEDETH := ${enableforcedeth}
-EC_FORCEDETH_KERNEL := ${kernelforcedeth}
-EC_ENABLE_E1000 := ${enablee1000}
-EC_E1000_KERNEL := ${kernele1000}
-EC_RTAI_DIR := "${rtaidir}"
-EC_MSR_DIR := "${msrdir}"
-EC_DUMMY := ${dummy}
+ENABLE_8139TOO := ${enable8139too}
+KERNEL_8139TOO := ${kernel8139too}
+ENABLE_E100 := ${enablee100}
+KERNEL_E100 := ${kernele100}
+ENABLE_FORCEDETH := ${enableforcedeth}
+KERNEL_FORCEDETH := ${kernelforcedeth}
+ENABLE_E1000 := ${enablee1000}
+ENABLE_E1000 := ${kernele1000}
+RTAI_DIR := "${rtaidir}"
+MSR_DIR := "${msrdir}"
+ENABLE_DEBUG_IF := ${dbg}
+ENABLE_DUMMY := ${dummy}
 EOF
 
 #------------------------------------------------------------------------------
diff --git a/devices/Kbuild b/devices/Kbuild
index e5adc7c4..395b7b7b 100644
--- a/devices/Kbuild
+++ b/devices/Kbuild
@@ -39,28 +39,28 @@ REV := $(shell if test -s $(src)/../svnrevision; then \
 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
 	fi)
 
-ifeq ($(EC_ENABLE_8139TOO),1)
-	EC_8139TOO_OBJ := 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
+ifeq ($(ENABLE_8139TOO),1)
+	EC_8139TOO_OBJ := 8139too-$(KERNEL_8139TOO)-ethercat.o
 	obj-m += ec_8139too.o
 	ec_8139too-objs := $(EC_8139TOO_OBJ)
 	CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
 endif
 
-ifeq ($(EC_ENABLE_E100),1)
-	EC_E100_OBJ := e100-$(EC_E100_KERNEL)-ethercat.o
+ifeq ($(ENABLE_E100),1)
+	EC_E100_OBJ := e100-$(KERNEL_E100)-ethercat.o
 	obj-m += ec_e100.o
 	ec_e100-objs := $(EC_E100_OBJ)
 	CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
 endif
 
-ifeq ($(EC_ENABLE_FORCEDETH),1)
-	EC_FORCEDETH_OBJ := forcedeth-$(EC_FORCEDETH_KERNEL)-ethercat.o
+ifeq ($(ENABLE_FORCEDETH),1)
+	EC_FORCEDETH_OBJ := forcedeth-$(KERNEL_FORCEDETH)-ethercat.o
 	obj-m += ec_forcedeth.o
 	ec_forcedeth-objs := $(EC_FORCEDETH_OBJ)
 	CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
 endif
 
-ifeq ($(EC_ENABLE_E1000),1)
+ifeq ($(ENABLE_E1000),1)
     obj-m += e1000/
 endif
 
diff --git a/devices/e1000/Kbuild b/devices/e1000/Kbuild
index 54ba8cd3..dc741f94 100644
--- a/devices/e1000/Kbuild
+++ b/devices/e1000/Kbuild
@@ -40,14 +40,14 @@ REV := $(shell if test -s $(TOPDIR)/svnrevision; then \
 		svnversion $(TOPDIR) 2>/dev/null || echo "unknown"; \
 	fi)
 
-ifeq ($(EC_ENABLE_E1000),1)
-	EC_E1000_OBJ := e1000_main-$(EC_E1000_KERNEL)-ethercat.o \
-        e1000_hw-$(EC_E1000_KERNEL)-ethercat.o \
-        e1000_ethtool-$(EC_E1000_KERNEL)-ethercat.o \
-        e1000_param-$(EC_E1000_KERNEL)-ethercat.o
+ifeq ($(ENABLE_E1000),1)
+	EC_E1000_OBJ := e1000_main-$(KERNEL_E1000)-ethercat.o \
+        e1000_hw-$(KERNEL_E1000)-ethercat.o \
+        e1000_ethtool-$(KERNEL_E1000)-ethercat.o \
+        e1000_param-$(KERNEL_E1000)-ethercat.o
 	obj-m += ec_e1000.o
 	ec_e1000-objs := $(EC_E1000_OBJ)
-	CFLAGS_e1000_main-$(EC_E1000_KERNEL)-ethercat.o = -DSVNREV=$(REV)
+	CFLAGS_e1000_main-$(KERNEL_E1000)-ethercat.o = -DSVNREV=$(REV)
 endif
 
 #------------------------------------------------------------------------------
diff --git a/dummy/Kbuild b/dummy/Kbuild
index 620e2e5b..15240f1b 100644
--- a/dummy/Kbuild
+++ b/dummy/Kbuild
@@ -39,7 +39,7 @@ REV := $(shell if test -s $(src)/../svnrevision; then \
 		svnversion $(src) 2>/dev/null || echo "unknown"; \
 	fi)
 
-ifeq ($(EC_DUMMY),1)
+ifeq ($(ENABLE_DUMMY),1)
     obj-m := ec_dummy.o
 	ec_dummy-objs := module.o master.o slave.o domain.o
 	CFLAGS_dummy.o := -DSVNREV=$(REV)
diff --git a/examples/msr/Kbuild b/examples/msr/Kbuild
index e1c9154c..6aaceb56 100644
--- a/examples/msr/Kbuild
+++ b/examples/msr/Kbuild
@@ -52,7 +52,7 @@ $(MODULE)-objs := msr_sample.o \
                         rt_lib/msr-math/msr_hex_bin.o \
                         libm.o
 
-EXTRA_CFLAGS := -I$(EC_MSR_DIR)/include -I$(EC_RTAI_DIR)/include \
+EXTRA_CFLAGS := -I$(MSR_DIR)/include -I$(RTAI_DIR)/include \
                 -D_SIMULATION -mhard-float
 
 #------------------------------------------------------------------------------
diff --git a/examples/rtai/Kbuild b/examples/rtai/Kbuild
index f3d90336..a24f6745 100644
--- a/examples/rtai/Kbuild
+++ b/examples/rtai/Kbuild
@@ -37,6 +37,6 @@ obj-m := ec_rtai_sample.o
 
 ec_rtai_sample-objs := rtai_sample.o
 
-EXTRA_CFLAGS := -I$(EC_RTAI_DIR)/include
+EXTRA_CFLAGS := -I$(RTAI_DIR)/include
 
 #------------------------------------------------------------------------------
-- 
GitLab