Makefile 624 B

12345678910111213141516171819202122232425262728
  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. DOC_FILES = $(RULES_FILES:.rules=.txt)
  9. # Location to install the docs
  10. DOC_DIR = $(PREFIX)/share/doc/udev-config
  11. all:
  12. install: install-rules
  13. install-rules:
  14. $(INSTALL) -d $(DESTDIR)$(RULES_DIR)
  15. for rule in $(RULES_FILES); do \
  16. $(INSTALL_DATA) $$rule $(DESTDIR)$(RULES_DIR) || exit 1; \
  17. done;
  18. install-doc:
  19. $(INSTALL) -d $(DESTDIR)$(DOC_DIR)
  20. for doc in $(DOC_FILES); do \
  21. $(INSTALL_DATA) doc/$$doc $(DESTDIR)$(DOC_DIR) || exit 1; \
  22. done