Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. V=2013.09.01
  2. INSTALL_SRC_DIR=parabolaiso/initcpio/install
  3. HOOKS_SRC_DIR=parabolaiso/initcpio/hooks
  4. SCRIPT_SRC_DIR=parabolaiso/initcpio/script
  5. INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
  6. HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
  7. SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio
  8. DOC_DIR=$(DESTDIR)/usr/share/doc/parabolaiso
  9. all: install dist
  10. install: install-program install-initcpio install-examples install-doc
  11. install-program:
  12. install -D -m 755 parabolaiso/mkparabolaiso "$(DESTDIR)/usr/bin/mkparabolaiso"
  13. install-initcpio:
  14. install -d "$(SCRIPT_DIR)" "$(HOOKS_DIR)" "$(INSTALL_DIR)"
  15. install -m 755 -t "$(SCRIPT_DIR)" $(wildcard $(SCRIPT_SRC_DIR)/*)
  16. install -m 644 -t "$(HOOKS_DIR)" $(wildcard $(HOOKS_SRC_DIR)/*)
  17. install -m 644 -t "$(INSTALL_DIR)" $(wildcard $(INSTALL_SRC_DIR)/*)
  18. install-examples:
  19. install -d -m 755 "$(DESTDIR)/usr/share/parabolaiso/"
  20. cp -a --no-preserve=ownership configs "$(DESTDIR)/usr/share/parabolaiso/"
  21. install-doc:
  22. install -d "$(DOC_DIR)"
  23. install -m 644 -t "$(DOC_DIR)" $(wildcard docs/*)
  24. uninstall: uninstall-program uninstall-initcpio uninstall-examples uninstall-doc
  25. uninstall-program:
  26. rm "$(DESTDIR)/usr/bin/mkparabolaiso"
  27. uninstall-initcpio:
  28. $(foreach file,$(wildcard $(SCRIPT_SRC_DIR)/*),rm -r "$(subst $(SCRIPT_SRC_DIR),$(SCRIPT_DIR),$(file))";)
  29. $(foreach file,$(wildcard $(HOOKS_SRC_DIR)/*),rm -r "$(subst $(HOOKS_SRC_DIR),$(HOOKS_DIR),$(file))";)
  30. $(foreach file,$(wildcard $(INSTALL_SRC_DIR)/*),rm -r "$(subst $(INSTALL_SRC_DIR),$(INSTALL_DIR),$(file))";)
  31. uninstall-examples:
  32. rm -rfd "$(DESTDIR)/usr/share/parabolaiso/configs"
  33. rm -d "$(DESTDIR)/usr/share/parabolaiso"
  34. uninstall-doc:
  35. rm -rf "$(DOC_DIR)"
  36. dist:
  37. ./expand $(V) dist
  38. dist-branches:
  39. ./expand $(V) dist-branches
  40. .PHONY: install install-program install-initcpio install-examples install-doc dist dist-branches uninstall uninstall-program uninstall-initcpio uninstall-examples uninstall-doc