Makefile.am 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # Please read the file COPYING, README and AUTHORS for more information.
  10. #
  11. .tmpl:
  12. $(AM_V_GEN)sed \
  13. -e "s@:ETCDIR:@${sysconfdir}@" \
  14. -e "s@:DOCDIR:@${docdir}@" \
  15. <$< >$@
  16. SUFFIXES = .tmpl
  17. static_docs = \
  18. Bopm.txt \
  19. Capabilities.txt \
  20. Commands.txt \
  21. Contributing.txt \
  22. FAQ.txt \
  23. HowToRelease.txt \
  24. Modes.txt \
  25. PAM.txt \
  26. Platforms.txt \
  27. Protocol.txt \
  28. README-AUX.txt \
  29. README-BeOS.txt \
  30. README-Interix.txt \
  31. RFC.txt \
  32. Services.txt \
  33. SSL.txt
  34. doc_templates = sample-ngircd.conf.tmpl
  35. generated_docs = sample-ngircd.conf
  36. toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
  37. SUBDIRS = src
  38. EXTRA_DIST = $(static_docs) $(doc_templates)
  39. CLEANFILES = $(generated_docs)
  40. maintainer-clean-local:
  41. rm -f Makefile Makefile.in
  42. all: $(generated_docs)
  43. install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
  44. $(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir)
  45. @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
  46. make install-config; \
  47. fi
  48. $(MKDIR_P) -m 755 $(DESTDIR)$(docdir)
  49. for f in $(static_docs) $(toplevel_docs); do \
  50. $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
  51. done
  52. for f in $(generated_docs); do \
  53. $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
  54. done
  55. install-config:
  56. $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
  57. @echo; \
  58. echo " ** NOTE: Installed sample configuration file:"; \
  59. echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
  60. echo
  61. uninstall-hook:
  62. rm -rf $(DESTDIR)$(docdir)
  63. @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
  64. make uninstall-config; \
  65. else \
  66. echo; \
  67. echo " ** NOTE: Not uninstalling changed configuration file:"; \
  68. echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
  69. echo; \
  70. fi
  71. uninstall-config:
  72. rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
  73. srcdoc:
  74. make -C src srcdoc
  75. .PHONY: install-config uninstall-config srcdoc
  76. # -eof-