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}@" \
37 doc_templates = sample-ngircd.conf.tmpl
39 generated_docs = sample-ngircd.conf
41 toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
45 EXTRA_DIST = $(static_docs) $(doc_templates)
47 CLEANFILES = $(generated_docs)
49 maintainer-clean-local:
50 rm -f Makefile Makefile.in
52 all: $(generated_docs)
54 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
55 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
56 @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
57 make install-config; \
59 $(mkinstalldirs) $(DESTDIR)$(docdir)
60 for f in $(static_docs) $(toplevel_docs); do \
61 $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
63 for f in $(generated_docs); do \
64 $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
68 $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
70 echo " ** NOTE: Installed sample configuration file:"; \
71 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
75 rm -rf $(DESTDIR)$(docdir)
76 @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
77 make uninstall-config; \
80 echo " ** NOTE: Not uninstalling changed configuration file:"; \
81 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
86 rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
91 .PHONY: install-config uninstall-config srcdoc