diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-05-22 16:54:12 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-05-23 09:07:42 +0100 |
commit | c1e8d232d14e7e751d5ba50796aa840e7f825865 (patch) | |
tree | fd98e3c5dbb10048871f7812e4a7bfe33584a006 | |
parent | 2d22a5b62d098db890186fd30382bab18fcbd6e0 (diff) |
gator: Get Makefile to work with DKMS
DKMS uses an absolute paths for $(src) and $(obj) whereas these are
relative paths for other kernel building scenarios. So we need to do
some jiggery-pokery to get the rule for gator_events.h to work in all
situations.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | drivers/gator/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gator/Makefile b/drivers/gator/Makefile index 5f4ab48452e..60d858741dd 100644 --- a/drivers/gator/Makefile +++ b/drivers/gator/Makefile @@ -33,16 +33,21 @@ gator-$(CONFIG_ARM) += gator_events_armv6.o \ gator_events_l2c-310.o \ gator_events_scorpion.o -$(obj)/gator_main.o: gator_events.h +$(obj)/gator_main.o: $(obj)/gator_events.h clean-files := gator_events.h +# Note, in the recipe below we use "cd $(srctree) && cd $(src)" rather than +# "cd $(srctree)/$(src)" because under DKMS $(src) is an absolute path, and we +# can't just use $(src) because for normal kernel builds this is relative to +# $(srctree) + chk_events.h = : quiet_chk_events.h = echo ' CHK $@' silent_chk_events.h = : -gator_events.h: FORCE +$(obj)/gator_events.h: FORCE @$($(quiet)chk_events.h) - $(Q)cd $(srctree)/$(src) ; $(CONFIG_SHELL) gator_events.sh $(objtree)/$(obj)/$@ + $(Q)cd $(srctree) && cd $(src) ; $(CONFIG_SHELL) gator_events.sh $(abspath $@) else |