From 004e2af8de6c0c1d0c76cb558964ce14b21b8a9d Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Mon, 26 Jun 2006 14:20:36 +0000 Subject: [PATCH] Better modules_install targets. --- Makefile | 7 ++++--- devices/Makefile | 4 +++- ethercat.conf.tmpl | 2 +- master/Makefile | 4 +++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6d9989d5..67510b1d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ # # Makefile -# +# # IgH EtherCAT master # # $Id$ @@ -55,6 +55,7 @@ endif KERNEL_DIR := /lib/modules/$(KERNEL)/build CURRENT_DIR := $(shell pwd) +INSTALL_MOD_DIR := ethercat modules: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules @@ -63,8 +64,8 @@ install: modules_install @script/install.sh $(KERNEL) modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/master modules_install - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/devices modules_install + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install clean: cleandoc $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean diff --git a/devices/Makefile b/devices/Makefile index 3247986f..01ce38e2 100644 --- a/devices/Makefile +++ b/devices/Makefile @@ -61,6 +61,7 @@ endif KERNEL_DIR := /lib/modules/$(KERNEL)/build CURRENT_DIR := $(shell pwd) +INSTALL_MOD_DIR := ethercat/devices modules: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules @@ -68,7 +69,8 @@ modules: install: modules_install modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules_install + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install clean: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean diff --git a/ethercat.conf.tmpl b/ethercat.conf.tmpl index 6f6aa214..5ce7e6ad 100644 --- a/ethercat.conf.tmpl +++ b/ethercat.conf.tmpl @@ -12,6 +12,6 @@ # # The kernel to compile the EtherCAT sources against # -KERNEL := `uname -r` +KERNEL := $(shell uname -r) #------------------------------------------------------------------------------ diff --git a/master/Makefile b/master/Makefile index 27fa40b9..3ab338f4 100644 --- a/master/Makefile +++ b/master/Makefile @@ -62,6 +62,7 @@ endif KERNEL_DIR := /lib/modules/$(KERNEL)/build CURRENT_DIR := $(shell pwd) +INSTALL_MOD_DIR := ethercat/master modules: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules @@ -69,7 +70,8 @@ modules: install: modules_install modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules_install + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install clean: $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean