Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. include ../../mconfig
  2. include ../../build/version.conf
  3. all: generate
  4. generate: dinit.8 dinitctl.8 dinitcheck.8 dinit-monitor.8 dinit-service.5 shutdown.8
  5. install: generate
  6. mkdir -p "$(DESTDIR)$(MANDIR)/man8"
  7. install -m644 dinit.8 dinitctl.8 dinitcheck.8 dinit-monitor.8 "$(DESTDIR)$(MANDIR)/man8"
  8. mkdir -p "$(DESTDIR)$(MANDIR)/man5"
  9. install -m644 dinit-service.5 "$(DESTDIR)$(MANDIR)/man5"
  10. ifeq ($(BUILD_SHUTDOWN),yes)
  11. install -m644 shutdown.8 "$(DESTDIR)$(MANDIR)/man8/$(SHUTDOWN_PREFIX)shutdown.8"
  12. ln -sf "$(SHUTDOWN_PREFIX)shutdown.8" "$(DESTDIR)$(MANDIR)/man8/$(SHUTDOWN_PREFIX)halt.8"
  13. ln -sf "$(SHUTDOWN_PREFIX)shutdown.8" "$(DESTDIR)$(MANDIR)/man8/$(SHUTDOWN_PREFIX)reboot.8"
  14. ln -sf "$(SHUTDOWN_PREFIX)shutdown.8" "$(DESTDIR)$(MANDIR)/man8/$(SHUTDOWN_PREFIX)poweroff.8"
  15. ln -sf "$(SHUTDOWN_PREFIX)shutdown.8" "$(DESTDIR)$(MANDIR)/man8/$(SHUTDOWN_PREFIX)soft-reboot.8"
  16. endif
  17. clean:
  18. rm -f dinit.8 dinitctl.8 dinitcheck.8 dinit-monitor.8 dinit-service.5 shutdown.8
  19. html: generate
  20. ./generate-html.sh
  21. dinit.8: dinit.8.m4
  22. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) -DSHUTDOWN_PREFIX=$(SHUTDOWN_PREFIX) dinit.8.m4 > dinit.8
  23. dinitctl.8: dinitctl.8.m4
  24. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) -DSHUTDOWN_PREFIX=$(SHUTDOWN_PREFIX) dinitctl.8.m4 > dinitctl.8
  25. dinitcheck.8: dinitcheck.8.m4
  26. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) dinitcheck.8.m4 > dinitcheck.8
  27. dinit-monitor.8: dinit-monitor.8.m4
  28. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) dinit-monitor.8.m4 > dinit-monitor.8
  29. dinit-service.5: dinit-service.5.m4
  30. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) -DDEFAULT_AUTO_RESTART=$(DEFAULT_AUTO_RESTART)\
  31. -DDEFAULT_START_TIMEOUT=$(DEFAULT_START_TIMEOUT)\
  32. -DDEFAULT_STOP_TIMEOUT=$(DEFAULT_STOP_TIMEOUT) dinit-service.5.m4 > dinit-service.5
  33. shutdown.8: shutdown.8.m4
  34. m4 -DVERSION=$(VERSION) -DMONTH=$(MONTH) -DYEAR=$(YEAR) -DSHUTDOWN_PREFIX=$(SHUTDOWN_PREFIX) shutdown.8.m4 > shutdown.8