# HG changeset patch # User Florian Pose # Date 1149238938 0 # Node ID 88177083f1370a87b94811d9142bfcdff9cc7815 # Parent 0234b0c26c5214abf6ef658756c9de5c5a5275bd Consistent Makefiles. diff -r 0234b0c26c52 -r 88177083f137 devices/Makefile --- a/devices/Makefile Fri Jun 02 08:38:04 2006 +0000 +++ b/devices/Makefile Fri Jun 02 09:02:18 2006 +0000 @@ -44,7 +44,7 @@ ec_8139too-objs := 8139too.o -REV := $(shell svnversion $(src) 2>/dev/null) +REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER) @@ -61,13 +61,14 @@ KERNEL := $(shell uname -r) endif -KERNELDIR := /lib/modules/$(KERNEL)/build +KERNEL_DIR := /lib/modules/$(KERNEL)/build +CURRENT_DIR := $(shell pwd) modules: - $(MAKE) -C $(KERNELDIR) M=`pwd` + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean: - $(MAKE) -C $(KERNELDIR) M=`pwd` clean + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean #------------------------------------------------------------------------------ diff -r 0234b0c26c52 -r 88177083f137 examples/mini/Makefile --- a/examples/mini/Makefile Fri Jun 02 08:38:04 2006 +0000 +++ b/examples/mini/Makefile Fri Jun 02 09:02:18 2006 +0000 @@ -56,14 +56,16 @@ ifneq ($(wildcard kernel.conf),) include kernel.conf else -KERNELDIR := /lib/modules/`uname -r`/build +KERNEL_DIR := /lib/modules/`uname -r`/build endif +CURRENT_DIR := $(shell pwd) + modules: - $(MAKE) -C $(KERNELDIR) M=`pwd` + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean: - $(MAKE) -C $(KERNELDIR) M=`pwd` clean + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean #---------------------------------------------------------------- diff -r 0234b0c26c52 -r 88177083f137 examples/msr/Makefile --- a/examples/msr/Makefile Fri Jun 02 08:38:04 2006 +0000 +++ b/examples/msr/Makefile Fri Jun 02 09:02:18 2006 +0000 @@ -75,13 +75,14 @@ KERNEL := $(shell uname -r) endif -KERNELDIR := /lib/modules/$(KERNEL)/build +KERNEL_DIR := /lib/modules/$(KERNEL)/build +CURRENT_DIR := $(shell pwd) modules: - $(MAKE) -C $(KERNELDIR) M=`pwd` + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean: - $(MAKE) -C $(KERNELDIR) M=`pwd` clean + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean install: @./install.sh $(MODULE) $(KERNEL) diff -r 0234b0c26c52 -r 88177083f137 examples/rtai/Makefile --- a/examples/rtai/Makefile Fri Jun 02 08:38:04 2006 +0000 +++ b/examples/rtai/Makefile Fri Jun 02 09:02:18 2006 +0000 @@ -58,14 +58,16 @@ ifneq ($(wildcard kernel.conf),) include kernel.conf else -KERNELDIR := /lib/modules/`uname -r`/build +KERNEL_DIR := /lib/modules/`uname -r`/build endif +CURRENT_DIR := $(shell pwd) + modules: - $(MAKE) -C $(KERNELDIR) M=`pwd` + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean: - $(MAKE) -C $(KERNELDIR) M=`pwd` clean + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean #------------------------------------------------------------------------------ diff -r 0234b0c26c52 -r 88177083f137 master/Makefile --- a/master/Makefile Fri Jun 02 08:38:04 2006 +0000 +++ b/master/Makefile Fri Jun 02 09:02:18 2006 +0000 @@ -45,7 +45,7 @@ ec_master-objs := module.o master.o device.o slave.o command.o types.o \ domain.o mailbox.o canopen.o ethernet.o debug.o fsm.o -REV := $(shell svnversion $(src) 2>/dev/null) +REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER) @@ -62,13 +62,14 @@ KERNEL := $(shell uname -r) endif -KERNELDIR := /lib/modules/$(KERNEL)/build +KERNEL_DIR := /lib/modules/$(KERNEL)/build +CURRENT_DIR := $(shell pwd) modules: - $(MAKE) -C $(KERNELDIR) M=`pwd` + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean: - $(MAKE) -C $(KERNELDIR) M=`pwd` clean + $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean #------------------------------------------------------------------------------