Support DESTDIR for module install/uninstall.
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 30 Sep 2007 14:42:11 +0000 (14:42 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 30 Sep 2007 14:42:11 +0000 (14:42 +0000)
comedi/Makefile.am

index 602fe673ab1c9dc912b5a1c9f0fa84e10f6ce73a..0ba5bc21e056d15ed53f71fdc9ac66a5d6c4503a 100644 (file)
@@ -26,12 +26,12 @@ all-local:
 install-data-local:
        $(MAKE) -I@abs_builddir@ -C $(LINUX_DIR) M=@abs_builddir@ CC="$(LINUX_CC) -I@abs_top_builddir@/ \
                -I@abs_top_srcdir@/include $(RTAI_CFLAGS) $(RTLINUX_CFLAGS)" INSTALL_MOD_DIR=$(COMEDI_MOD_DIR) \
-               INSTALL_MOD_PATH="$(prefix)" modules_install
+               INSTALL_MOD_PATH="$(DESTDIR)$(prefix)" modules_install
 clean-local:
        $(MAKE) -I@abs_builddir@ -C $(LINUX_DIR) M=@abs_builddir@ CC="$(LINUX_CC) -I@abs_top_builddir@/ \
                -I@abs_top_srcdir@/include $(RTAI_CFLAGS) $(RTLINUX_CFLAGS)" clean
 uninstall-local:
-       find $(prefix)/$(LINUX_MODLIB)/$(COMEDI_MOD_DIR) -name '*.ko' -exec $(RM) {} \;
+       find $(DESTDIR)$(prefix)/$(LINUX_MODLIB)/$(COMEDI_MOD_DIR) -name '*.ko' -exec $(RM) {} \;
 else
 module_PROGRAMS = comedi.ko
 all-local: