linux-gpib-3.2.21-build.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff -ruN linux-gpib-3.2.21.orig/drivers/Makefile.am linux-gpib-3.2.21/drivers/Makefile.am
  2. --- linux-gpib-3.2.21.orig/drivers/Makefile.am 2014-12-13 11:27:55.000000000 +0100
  3. +++ linux-gpib-3.2.21/drivers/Makefile.am 2014-12-17 17:51:47.152588400 +0100
  4. @@ -28,39 +28,13 @@
  5. CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/drivers/gpib/include -I@abs_top_srcdir@/include" \
  6. SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)"
  7. -install-data-hook: device-file-check /etc/gpib.conf
  8. +install-data-hook: /etc/gpib.conf
  9. $(MAKE) -C $(LINUX_SRCDIR) V=1 modules_install\
  10. CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/driver/include -I@abs_top_srcdir@/include" \
  11. SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)" INSTALL_MOD_DIR="gpib"
  12. - $(DEPMOD) -a
  13. -
  14. -/dev/gpib0:
  15. - groupadd gpib || echo "group gpib exists"
  16. - for i in `seq 0 15`; \
  17. - do \
  18. - mknod -m u=rw,g=rw,o= /dev/gpib$${i} c $(IBMAJOR) $${i} || exit 1; \
  19. - chown root:gpib /dev/gpib$${i}; \
  20. - done
  21. -
  22. -.PHONY : device-file-check
  23. -device-file-check: /dev/gpib0
  24. - @if [ ! -c /dev/gpib0 ]; then \
  25. - if [ -a /dev/gpib0 ]; then \
  26. - echo "A file or directory called /dev/gpib0 exists but it is not" \
  27. - "a character device. Delete or move it and try again."; \
  28. - exit 1; \
  29. - fi; \
  30. - fi
  31. - @ls -l /dev/gpib0 | grep -q "$(IBMAJOR)"; \
  32. - if [ $$? != 0 ]; then \
  33. - echo "/dev/gpib0 has the wrong major number. " \
  34. - "Delete your /dev/gpibX files and try again."; \
  35. - exit 1; \
  36. - fi
  37. #should move this to util/templates Makefile.am when it exists
  38. /etc/gpib.conf:
  39. - $(INSTALL_DATA) -D $(top_srcdir)/util/templates/gpib.conf /etc/gpib.conf
  40. #make sure compiled files, etc don't make it into distribution tarballs
  41. dist-hook: