2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2013 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}@" \
15 -e "s@:DOCDIR:@${docdir}@" \
39 doc_templates = sample-ngircd.conf.tmpl
41 generated_docs = sample-ngircd.conf
43 toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
47 EXTRA_DIST = $(static_docs) $(doc_templates)
49 CLEANFILES = $(generated_docs)
51 maintainer-clean-local:
52 rm -f Makefile Makefile.in
54 all: $(generated_docs)
56 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
57 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
58 @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
59 make install-config; \
61 $(mkinstalldirs) $(DESTDIR)$(docdir)
62 for f in $(static_docs) $(toplevel_docs); do \
63 $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
65 for f in $(generated_docs); do \
66 $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
70 $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
72 echo " ** NOTE: Installed sample configuration file:"; \
73 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
77 rm -rf $(DESTDIR)$(docdir)
78 @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
79 make uninstall-config; \
82 echo " ** NOTE: Not uninstalling changed configuration file:"; \
83 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
88 rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
93 .PHONY: install-config uninstall-config srcdoc