Makefile 938 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. PREFIX ?= /usr/local
  4. BIN_DIR=$(DESTDIR)$(PREFIX)/bin
  5. DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/parabolaiso
  6. PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/parabolaiso
  7. DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
  8. SCRIPT_FILES=$(wildcard parabolaiso/*) $(wildcard scripts/*.sh) \
  9. $(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
  10. all:
  11. check: shellcheck
  12. shellcheck:
  13. shellcheck -s bash $(SCRIPT_FILES)
  14. install: install-scripts install-profiles install-doc
  15. install-scripts:
  16. install -vDm 755 parabolaiso/mkparabolaiso -t "$(BIN_DIR)/"
  17. install -vDm 755 scripts/run_parabolaiso.sh "$(BIN_DIR)/run_parabolaiso"
  18. install-profiles:
  19. install -d -m 755 $(PROFILE_DIR)
  20. cp -a --no-preserve=ownership configs $(PROFILE_DIR)/
  21. install-doc:
  22. install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
  23. .PHONY: check install install-doc install-profiles install-scripts shellcheck