Makefile 937 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Makefile to install udev rules and documentation
  2. PREFIX = /usr
  3. RULES_DIR = /etc/udev/rules.d
  4. INSTALL = install
  5. INSTALL_DATA = $(INSTALL) -m644
  6. RULES_FILES = \
  7. 55-lfs.rules \
  8. 61-cdrom.rules
  9. DOC_FILES = $(RULES_FILES:.rules=.txt)
  10. EXTRA_DOC_FILES = \
  11. 05-udev-early.txt \
  12. 60-persistent-input.txt \
  13. 60-persistent-storage.txt \
  14. 80-drivers.txt \
  15. 95-udev-late.txt
  16. # Location to install the docs
  17. DOC_DIR = $(PREFIX)/share/doc/udev-config
  18. all:
  19. install: install-rules
  20. install-rules:
  21. $(INSTALL) -d $(DESTDIR)$(RULES_DIR)
  22. for rule in $(RULES_FILES); do \
  23. $(INSTALL_DATA) $$rule $(DESTDIR)$(RULES_DIR) || exit 1; \
  24. done;
  25. install-doc:
  26. $(INSTALL) -d $(DESTDIR)$(DOC_DIR)
  27. for doc in $(DOC_FILES); do \
  28. $(INSTALL_DATA) doc/$$doc $(DESTDIR)$(DOC_DIR) || exit 1; \
  29. done
  30. install-extra-doc:
  31. $(INSTALL) -d $(DESTDIR)$(DOC_DIR)
  32. for doc in $(EXTRA_DOC_FILES); do \
  33. $(INSTALL_DATA) doc/$$doc $(DESTDIR)$(DOC_DIR) || exit 1; \
  34. done