Makefile.am 2.2 KB

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