X-Git-Url: https://git.sur5r.net/?p=groeck-it87;a=blobdiff_plain;f=Makefile;h=1b88e2a01ce096f7a5e697b9cc51f297ac5c0150;hp=d4b96c3b26400d777a761a72fe20fe05c30cf2d0;hb=1d68bab74cfe2323042571662496d89608e7ee79;hpb=3fde481373cebaf4d2dd03441e909b7ee880dca6 diff --git a/Makefile b/Makefile index d4b96c3..1b88e2a 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,14 @@ all: modules # Targets for running make directly in the external module directory: -EXTRA_CFLAGS=-DIT87_DRIVER_VERSION='\"$(shell git describe --long)\"' +ifneq ("","$(wildcard .git/*)") +IT87_CFLAGS=-DIT87_DRIVER_VERSION='\"$(shell git describe --long)\"' +else +IT87_CFLAGS=-DIT87_DRIVER_VERSION='\"\"' +endif modules: - @$(MAKE) EXTRA_CFLAGS=$(EXTRA_CFLAGS) -C $(KERNEL_BUILD) M=$(CURDIR) $@ + @$(MAKE) EXTRA_CFLAGS="$(IT87_CFLAGS)" -C $(KERNEL_BUILD) M=$(CURDIR) $@ clean: @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@