You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

99 lines
2.7 KiB

  1. # Makefile
  2. ## live-config(7) - System Configuration Components
  3. ## Copyright (C) 2016-2020 The Debian Live team
  4. ## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
  5. ##
  6. ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
  7. ## This is free software, and you are welcome to redistribute it
  8. ## under certain conditions; see COPYING for details.
  9. SHELL := sh -e
  10. LANGUAGES = $(shell cd manpages/po && ls)
  11. SCRIPTS = backend/*/*.init frontend/* components/*
  12. all: build
  13. test:
  14. @echo -n "Checking for syntax errors"
  15. @for SCRIPT in $(SCRIPTS); \
  16. do \
  17. sh -n $${SCRIPT}; \
  18. echo -n "."; \
  19. done
  20. @echo " done."
  21. @if [ -x "$$(which checkbashisms 2>/dev/null)" ]; \
  22. then \
  23. echo -n "Checking for bashisms"; \
  24. for SCRIPT in $(SCRIPTS); \
  25. do \
  26. checkbashisms -f -x $${SCRIPT}; \
  27. echo -n "."; \
  28. done; \
  29. echo " done."; \
  30. else \
  31. echo "W: checkbashisms - command not found"; \
  32. echo "I: checkbashisms can be obtained from: "; \
  33. echo "I: http://git.debian.org/?p=devscripts/devscripts.git"; \
  34. echo "I: On Debian based systems, checkbashisms can be installed with:"; \
  35. echo "I: apt-get install devscripts"; \
  36. fi
  37. build:
  38. @echo "Nothing to build."
  39. install:
  40. # Installing backend
  41. mkdir -p $(DESTDIR)/etc/init.d
  42. cp backend/sysvinit/live-config.init $(DESTDIR)/etc/init.d/live-config
  43. mkdir -p $(DESTDIR)/lib/systemd/system $(DESTDIR)/lib/systemd/system-generators
  44. cp backend/systemd/live-config.systemd $(DESTDIR)/lib/systemd/system/live-config.service
  45. cp backend/systemd/live-config-getty-generator $(DESTDIR)/lib/systemd/system-generators/
  46. # Installing frontend and components
  47. mkdir -p $(DESTDIR)/bin $(DESTDIR)/lib/live/config
  48. cp frontend/live-* $(DESTDIR)/bin
  49. cp frontend/*.sh $(DESTDIR)/lib/live/
  50. cp components/* $(DESTDIR)/lib/live/config
  51. mkdir -p $(DESTDIR)/var/lib/live/config
  52. # Installing shared data
  53. mkdir -p $(DESTDIR)/usr/share/live/config
  54. cp -r VERSION share/* $(DESTDIR)/usr/share/live/config
  55. # Installing docs
  56. mkdir -p $(DESTDIR)/usr/share/doc/live-config
  57. cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-config
  58. # Installing manpages
  59. for MANPAGE in manpages/en/*; \
  60. do \
  61. SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
  62. install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \
  63. done
  64. for LANGUAGE in $(LANGUAGES); \
  65. do \
  66. for MANPAGE in manpages/$${LANGUAGE}/*; \
  67. do \
  68. SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
  69. install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
  70. done; \
  71. done
  72. clean:
  73. @echo "Nothing to clean."
  74. distclean: clean
  75. @echo "Nothing to distclean."
  76. reinstall: uninstall install