master/Makefile
changeset 267 88177083f137
parent 246 0bf7c769de06
child 272 efb1c792a6a4
--- 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
 
 #------------------------------------------------------------------------------