2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
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.
14 -e "s@:ETCDIR:@${sysconfdir}@" \
38 doc_templates = sample-ngircd.conf.tmpl
40 generated_docs = sample-ngircd.conf
42 toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
46 EXTRA_DIST = $(static_docs) $(doc_templates)
48 CLEANFILES = $(generated_docs)
50 maintainer-clean-local:
51 rm -f Makefile Makefile.in
53 all: $(generated_docs)
55 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
56 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
57 @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
58 make install-config; \
60 $(mkinstalldirs) $(DESTDIR)$(docdir)
61 for f in $(static_docs) $(toplevel_docs); do \
62 $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
64 for f in $(generated_docs); do \
65 $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
69 $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
71 echo " ** NOTE: Installed sample configuration file:"; \
72 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
76 rm -rf $(DESTDIR)$(docdir)
77 @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
78 make uninstall-config; \
81 echo " ** NOTE: Not uninstalling changed configuration file:"; \
82 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
87 rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
92 .PHONY: install-config uninstall-config srcdoc