Makefile.am 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2013 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. GIT.txt \
  24. HowToRelease.txt \
  25. Modes.txt \
  26. PAM.txt \
  27. Platforms.txt \
  28. Protocol.txt \
  29. README-AUX.txt \
  30. README-BeOS.txt \
  31. README-Interix.txt \
  32. RFC.txt \
  33. Services.txt \
  34. SSL.txt
  35. doc_templates = sample-ngircd.conf.tmpl
  36. generated_docs = sample-ngircd.conf
  37. toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
  38. SUBDIRS = src
  39. EXTRA_DIST = $(static_docs) $(doc_templates)
  40. CLEANFILES = $(generated_docs)
  41. maintainer-clean-local:
  42. rm -f Makefile Makefile.in
  43. all: $(generated_docs)
  44. install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
  45. $(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir)
  46. @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
  47. make install-config; \
  48. fi
  49. $(MKDIR_P) -m 755 $(DESTDIR)$(docdir)
  50. for f in $(static_docs) $(toplevel_docs); do \
  51. $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
  52. done
  53. for f in $(generated_docs); do \
  54. $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
  55. done
  56. install-config:
  57. $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
  58. @echo; \
  59. echo " ** NOTE: Installed sample configuration file:"; \
  60. echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
  61. echo
  62. uninstall-hook:
  63. rm -rf $(DESTDIR)$(docdir)
  64. @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
  65. make uninstall-config; \
  66. else \
  67. echo; \
  68. echo " ** NOTE: Not uninstalling changed configuration file:"; \
  69. echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
  70. echo; \
  71. fi
  72. uninstall-config:
  73. rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
  74. srcdoc:
  75. make -C src srcdoc
  76. .PHONY: install-config uninstall-config srcdoc
  77. # -eof-